JNI : Unsatisfied Link Error using C++ from Java
843829Jun 17 2002 — edited Nov 19 2002Am using JNI to call a C Function which in turn creates a new C++ object and calls a method on it.
When I run the java program that calls this native method, I get a UnsatisfiedLinkError : No <lib> in java.library.path.
If I change the C function to do a simple printf instead of creating a new object , it works fine.
I am printng out the java.library.path before calling the loadLibrary method, the path is correct.
Am using Java 1.2.2 and compiling with gcc 2.7 on solaris 2.6 (Sun OS 5.6)
Any help would be appreciated. I have seen some other folks having similar problems but haven't seen any replies that seem to solve the problem.