Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

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

Highlighted
Advisor

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
1 REPLIES
Acclaimed Contributor Acclaimed Contributor

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?