Re: Get UnsatisfiedLinkError when using System.LoadLibrary(..) (276 Views)
Reply
Occasional Visitor
ILDUS HAKOV
Posts: 3
Registered: ‎01-11-2001
Message 1 of 4 (276 Views)
Accepted Solution

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
Honored Contributor
Berlene Herren
Posts: 1,514
Registered: ‎10-11-1999
Message 2 of 4 (276 Views)

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
Occasional Visitor
ILDUS HAKOV
Posts: 3
Registered: ‎01-11-2001
Message 3 of 4 (276 Views)

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

Occasional Visitor
ILDUS HAKOV
Posts: 3
Registered: ‎01-11-2001
Message 4 of 4 (276 Views)

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");
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.