Update installation path for libjdic.so and libtray.so

Bug #550807 reported by Antoine DETANTE
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
libjdic-java (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: libjdic-bin

Currently, installation of package libjdic-bin will put JNI libraries (libjdic.so and libtray.so) to /usr/lib/jni
But when using JDIC with SUN JRE, this path isn't in the java.library.path.

(Standard SUN JRE library path is /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/server:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/../lib/i386:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/client:/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib)

So the libjdic.so isn't find in the library path and Java applications will crash with a UnsatisfiedLinkError.

It would be interesting to update the destination path for libjdic.so and libtray.so to /usr/lib ?

Ubuntu: 9.10
libjdic-bin: 0.9.5-3ubuntu1
sun-java6-jre: 6-15-1

Revision history for this message
Hernan (hernan-123) wrote :

In Lucid even copying libraries to /usr/lib doesnot solve the problem, giving error:
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib/libjdic.so

I could only solve this error modifing the source code and hard-code the path in System.load of load_native_library.diff

Ubuntu : 10.04
libjdic-bin/kava : 0.9.5-3ubuntu2
sub-java6-jre : 6.20dlj-1ubuntu3
-----
Full error:
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.jdesktop.jdic.tray.internal.ServiceManager.getService(Unknown Source)
 at org.jdesktop.jdic.tray.TrayIcon.<init>(Unknown Source)
 at TestTomcat.IconTray.loadIcon(IconTray.java:45)
 at TestTomcat.TestTomcat.main(TestTomcat.java:40)
Caused by: java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/amd64/server:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/amd64:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib/libjdic.so
 at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1702)
 at java.lang.Runtime.load0(Runtime.java:770)
 at java.lang.System.load(System.java:1003)
 at org.jdesktop.jdic.init.JdicManager$1.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jdesktop.jdic.init.JdicManager.loadLibrary(Unknown Source)
 at org.jdesktop.jdic.tray.internal.impl.GnomeTrayAppletService.<clinit>(Unknown Source)
 at org.jdesktop.jdic.tray.internal.impl.ServiceManagerStub_unix.getService(Unknown Source)
 ... 8 more

Revision history for this message
Gabriel C. Stabel (gstabel) wrote :

You can set LD_LIBRARY_PATH environment variable to fix it. Worked fine fo me.

$ export LD_LIBRARY_PATH=/usr/lib/jni

Thanks to Stéphane ideia from: https://lists.ubuntu.com/archives/universe-bugs/2009-February/047833.html.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.