java.lang.UnsatisfiedLinkError
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? Thanks! 周涛 --------------------------------------------------------------------------------------------------- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. ---------------------------------------------------------------------------------------------------
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
participants (2)
-
Richard W.M. Jones -
周涛