[libvirt-users] Libvirt java from Windows

Sergey Sudakovich (ssudakov) ssudakov at cisco.com
Fri Dec 23 23:59:57 UTC 2011


I am writing a java based client that would be executed from windows
that will use libvirt.

1.       Got libvirt-java (
http://libvirt.org/sources/java/libvirt-java-0.4.7.tar.gz) and build a
jar out it (ant with no params)

2.       Then, according to http://libvirt.org/windows.html, built a dll
using the "MSYS build script"

3.       Got 2 files libvirt-0.dll and libqemu-0.dll

When I run the sample example(from Eclipse) from
http://libvirt.org/java.html I get the following error:

 

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to
load library 'virt': %1 is not a valid Win32 application.

 

      at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:169)

      at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:242)

      at com.sun.jna.Library$Handler.<init>(Library.java:140)

      at com.sun.jna.Native.loadLibrary(Native.java:368)

      at com.sun.jna.Native.loadLibrary(Native.java:353)

      at org.libvirt.jna.Libvirt.<clinit>(Unknown Source)

      at org.libvirt.Connect.<clinit>(Unknown Source)

      at Main.main(Main.java:26)

 

 

Also tried instead of step 2 cross compile in Fedora - same error
message when I use new dll's.

 

Does anybody have any idea where do I start fixing the issue??

 

-- 

Thank you,

Sergey Sudakovich 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20111223/27370e30/attachment.htm>


More information about the libvirt-users mailing list