java.lang.UnsatisfiedLinkError: Can't load library:/home/sw/libStats.so (228 Views)
Reply
Advisor
nallamolu
Posts: 31
Registered: ‎12-24-2008
Message 1 of 2 (228 Views)

java.lang.UnsatisfiedLinkError: Can't load library:/home/sw/libStats.so

Hi World,

I generated a .jar and a.so (shared library)binaries for a 64bit PA_RISC using the
following configuration:

Compiler: gcc-hppa64-4.3.1.depot
Java : jdk6_16002_pa.depot
OS : PA_RISC 64 Bit

I used the Compiling Options as
gcc -fPIC -D_REENTRANT

Linking Options as
gcc -lc -shared

I invoked the 64 Bit JVM using
-d64

When I tried to access these .jar & .so binaries using java(using System.load()). It is generating an error message as :
java.lang.UnsatisfiedLinkError: Can't load library:/home/sw/libStats.so
java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650)
java.lang.Runtime.load0(Runtime.java:770)
java.lang.System.load(System.java:1005)



Does i need to install any gcc patches for rectifying this problem.

Is there any other way of invoking 64 Bit JVM


I would appreciate any help on this

Thanks in Advance
Gopinath
Please use plain text.
Acclaimed Contributor
Dennis Handly
Posts: 24,849
Registered: ‎03-06-2006
Message 2 of 2 (228 Views)

Re: java.lang.UnsatisfiedLinkError: Can't load library:/home/sw/libStats.so

I assume you know you can use C (gcc) with java but not g++? With C++, you must use aC++.

>gcc -lc -shared

No need to use -lc on any shlib, remove it.
Is your C source self contained, except for libc?

Please use plain text.
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