Operating System - HP-UX
1748267 Members
3785 Online
108760 Solutions
New Discussion юеВ

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

 
SOLVED
Go to solution
ILDUS HAKOV
New Member

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 3
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
New Member

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
New Member

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");