[3463] in java-interest

home help back first fref pref prev next nref lref last post

Re: Native methods - UnsatisfiedLinkError

daemon@ATHENA.MIT.EDU (Thomas Ball)
Mon Nov 13 20:38:55 1995

Date: Mon, 13 Nov 1995 14:18:59 -0800
From: Thomas.Ball@Eng.Sun.COM (Thomas Ball)
To: anoor@hedley.East.Sun.COM
Cc: java-interest@java.Eng.Sun.COM

You can verify that the library was successfully loaded (you *are*
calling System.loadLibrary() in a static initializer, aren't you?) with
truss.  Something like:

    % truss -f -t open -s\!all java <java app and args> |& tee open.log

should show you what attempts Java is making on loading your library.
The open.log file will then show all open attempts, the paths used and
whether the call was successful or not.

Tom Ball
Java Products Group

>  I'm having a problem getting Java to successfully execute an application that
>  has a native method in it.  Even the examples that are part of the Programmers
>  Guide do not work.  The actual message (only 2 lines) is:
>  
>  	java.lang.UnsatisfiedLinkError: displayHelloWorld
>          	at Main.main(Main.java:3)
>  
>  I'm using the Beta JDK on a Solaris 2.5 machine; my CLASSPATH is set correctly,
>  and so is my LD_LIBRARY_PATH.  The libhello.so exists so there is no problem
>  with the files not being available.  
>  
>  I'm not even able to execute the Replace example due to a similar problem.  Is 
>  there anything I'm missing here?  Thanks in advance.
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post