[Libguestfs] java.lang.UnsatisfiedLinkError
Richard W.M. Jones
rjones at redhat.com
Tue Sep 11 14:31:52 UTC 2012
On Mon, Sep 10, 2012 at 06:05:09PM +0800, 周涛 wrote:
> hi jones!
>
> i run a java testcase in my new environment(V1.19.35 that was installed by "make install"),
> "System.loadLibrary ("guestfs_jni")" leads to :
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no libguestfs_jni in java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
> at java.lang.Runtime.loadLibrary0(Runtime.java:845)
> at java.lang.System.loadLibrary(System.java:1084)
> but "find /usr/local/lib -name '*guestfs_jni*' " returns:
> /usr/local/lib/libguestfs_jni.so.1.19.35
> /usr/local/lib/libguestfs_jni.so
> /usr/local/lib/libguestfs_jni.la
> /usr/local/lib/libguestfs_jni.so.1
>
> and i tried to add "/usr/local/lib/" into LD_LIBRARY_PATH, but it had no effect.
> could you tell me the reason?
You have to run the JVM like this:
java -Djava.library.path=/usr/local/lib [classname]
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
More information about the Libguestfs
mailing list