Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Get UnsatisfiedLinkError when using System.LoadLibrary(..)

SOLVED
Go to solution
Highlighted
ILDUS HAKOV
Occasional Visitor

Get UnsatisfiedLinkError when using System.LoadLibrary(..)

Hello,

We are using JNI calls to legacy C code from Java on NT4.0 and HP11. Both have java1.2.
When calling System.loadLibrary(ourlib)we get
"UnsatisfiedLinkError no ourlib in java.library.path".
Env. vars: $SHLIB_PATH,$PATH,$LPATH,$LD_LIBRARY_PATH and property java.library.path point to the path where ourlib is.
System.load(absolutepathandlibname)works fine.
This problem exists only on HP, on NT everything is OK.

Any help appreciated,
Thank you in advance,
ILdus
3 REPLIES
Berlene Herren
Honored Contributor
Solution

Re: Get UnsatisfiedLinkError when using System.LoadLibrary(..)

When you run a JNI application using the Java Virtual Machine in the SDK for
Java 2.x, you must use build 2435 or greater of the Java Virtual Machine. When
you run a JNI application using the Java Virtual Machine in the SDK for Java
3.x, you must use build 3158 or greater of the Java Virtual Machine.

Berlene
http://www.mindspring.com/~bkherren/dobes/index.htm
ILDUS HAKOV
Occasional Visitor

Re: Get UnsatisfiedLinkError when using System.LoadLibrary(..)

We get the following version info on our JVM.

->java -version
java version "1.2.2.04"
HotSpot VM (1.0.1fcs, mixed mode, PA2.0 build 1.2.2.04-00/04/14-PA_RISC2.0)

Is it OK?

Was your note referring to the HotSpot JVM or another one? If you were referring to HotSpot can you tell us how to determine our build number. If you weren't referring to HotSpot do you know the relevant build numbers for HotSpot?

Thanks

ILDUS HAKOV
Occasional Visitor

Re: Get UnsatisfiedLinkError when using System.LoadLibrary(..)

The problem was solved by adding a word lib to library name.
Before: jawsstand.sl
After: libjawsstand.sl
But the call to loadLibrary should have the name jawsstand:
System.loadLibrary("jawsstand");