[libvirt-users] Using Libvirt Java Bindings on Windows 7 64bit

Frank Wilson fajwilson at gmail.com
Tue Aug 21 08:57:38 UTC 2012


Hi All,

Has anybody had any managed to use the libvirt java bindings on Windows 7
64bit (or similar configuration)?

I am using Java 6.

When I try to use the Test.class delivered with the bindings it always
fails with the following error:

C:\Users\fwilson\Desktop\libvirt-java-0.4.7>java
"-Djna.library.path=C:/Program
Files (x86)/Libvirt/lib/" -classpath .;target/classes;jars/* Test
Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load
librar
y 'virt': The specified module could not be found.

        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 Test.main(Test.java:17)

I installed libvirt using the experimental package:

http://libvirt.org/windows.html

Is this a 32bit build? Does that mean I should use a 32bit JVM?

In any case the above test program fails whether I use a 32 or 64 bit JVM.

I tried pointing jna.library.path to the libvirt bin directory instead of
the lib directory but that also failed.

Thanks for any help you can offer,

Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120821/e695d5e1/attachment.htm>


More information about the libvirt-users mailing list