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!

UnsatisfiedLinkError in Windows, but not in Linux - WHY?

843829Jul 8 2003 — edited Jul 9 2003
Hi. I've just tested out the HelloWorld jni tutorial on Windows and Linux, following every step exactly on both platforms. On both platforms I'm using the gcc compiler to compile the C code, and on Linux I'm using j2sdk1.4.0_01, whereas on Windows I've used both j2sdk1.4.1_01 and j2sdk1.4.2. The program works fine on Linux, but on Windows I get the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: dispMsg

where "dispMsg" is the name of my native function.
I know that the library is loading correctly, as no error gets thrown if I load the library without calling the function. And yes I did use javah to create the header file, and I copied the function head exactly from the header file.
I can't figure out why it's not working. Any help anyone??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2003
Added on Jul 8 2003
1 comment
183 views