JRockit: JRMC-3.0.3-1.6.0 Cannot Find Custom JNI *.so Libraries.

(Doc ID 874092.1)

Last updated on OCTOBER 24, 2011

Applies to:

Oracle JRockit - Version: R27.5 to R27.6 - Release: JRockit to JRockit
Information in this document applies to any platform.


Sun Solaris10 Sparc 64Bit OS

JRockit JRMC [BEA JRockit(R) (build R27.6.3-40_o-112056-1.6.0_11-20090318-2103-solaris-sparcv9, compiled mode]

It appears that the JRMC-3.0.3-1.6.0 cannot find custom JNI *.so libraries.

You are trying to run a simple java file and using a custom JNI .so file like libsilib.so.  It compiles fine but fails during runtime with the exception below:

bash-3.00$ ./runit.sh

native lib 'silib' not found in 'Java.library.path': /home/kvalluri/data1/
Exception in thread "Main Thread" java.lang.UnsatisfiedLinkError: no silib in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1709)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at com.omgeo.ssi.util.SystemInformation.<clinit>(SystemInformation.java:18)
Could not find the main class: com.omgeo.ssi.util/SystemInformation. Program will exit.

The custom .so file libsilib.so is present in the path but it appears that somehow JRockit is not able to load it.

bash-3.00$ cd data1
bash-3.00$ ls
SystemInformation.class Systeminfo.h runit.sh
SystemInformation.java libsilib.so.64 sysinf.jar
Systeminfo.c make.sh

Also this is a 64-bit JNI:

bash-3.00$ file libsilib.so.64

libsilib.so.64: ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms