Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

UnsatisfiedLinkError with libtray.so

Thread view: 
robert - 13 Jul 2006 18:45 GMT
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
Piotr Kobzda - 13 Jul 2006 22:21 GMT
> System.loadLibrary( "tray.so");

Try this:

  System.loadLibrary( "tray" );

piotr


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.