UnsatisfiedLinkError with libtray.so

R

robert

Hi all,

I've tried everything I can think off to load libtray.so . I'm using
jdk1.5.0_03 on linux. I can run the jdesktop samples just fine such as:


java -classpath ..\..\jdic.jar;. -Djava.library.path=..\..\ FileChooser

When trying my app I get:

/home/iksrazal/nwo> java -jar maragato-config-1.0.0.jar
Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: initTray
at
org.jdesktop.jdic.tray.internal.impl.DisplayThread.initTray(Native
Method)
at
org.jdesktop.jdic.tray.internal.impl.DisplayThread.run(Unknown Source)

I have the .so files here:

/home/iksrazal/nwo> ls -l *.so
-rwxr-xr-x 1 iksrazal users 21154 2006-07-13 13:17 libjdic.so
-rwxr-xr-x 1 iksrazal users 469345 2006-07-13 13:17
libmozembed-linux-gtk1.2.so
-rwxr-xr-x 1 iksrazal users 455336 2006-07-13 13:17
libmozembed-linux-gtk2.so
-rwxr-xr-x 1 iksrazal users 19779 2006-07-13 13:17 libtray.so
-rwxr-xr-x 1 iksrazal users 19779 2006-07-13 14:28 tray.so

I also tried:

/home/iksrazal/nwo> java -jar maragato-config-1.0.0.jar
-Djava.library.path=.
Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: initTray

And I tried printout the default java.library.path :

path:
/usr/local/jdk1.5.0_03/jre/lib/i386/client:/usr/local/jdk1.5.0_03/jre/lib/i386:/usr/local/jdk1.5.0_03/jre/../lib/i386:/home/iksrazal/nwo

I put the files in /usr/local/jdk1.5.0_03/jre/lib/i386/client/ - no
difference:

I tried a static initializer:

static {
String loc = "/home/iksrazal/nwo";
String path = System.getProperty("java.library.path");
if( loc != null ) {
System.out.println("path: " + path);
System.out.println("Attempting to load: " + loc+"/libtray.so");
System.load( loc+"/libtray.so");
System.loadLibrary( "tray.so");
} else {
System.err.println("library.dir not defined");
}
}

I tried several name combos, always getting:

/home/iksrazal/nwo> java -jar maragato-config-1.0.0.jar
-Djava.library.path=.
path:
/usr/local/jdk1.5.0_03/jre/lib/i386/client:/usr/local/jdk1.5.0_03/jre/lib/i386:/usr/local/jdk1.5.0_03/jre/../lib/i386:/home/iksrazal/nwo
Attempting to load: /home/iksrazal/nwo/libtray.so
Exception in thread "main" java.lang.UnsatisfiedLinkError: no tray.so
in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at
br.com.atlantico.maragato.config.MaragatoConfigTray.<clinit>(MaragatoConfigTray.java:47)

Please help!
Robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,787
Messages
2,569,631
Members
45,338
Latest member
41Pearline46

Latest Threads

Top