UnsatisfiedLinkError in Windows, but not in Linux - WHY?
843829Jul 8 2003 — edited Jul 9 2003Hi. 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??