Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JNI : Unsatisfied Link Error using C++ from Java

843829Jun 17 2002 — edited Nov 19 2002
Am 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 17 2002
Added on Jun 17 2002
15 comments
1,030 views