JNI not working on SoyLatte

Trevor Harmon trevor at vocaro.com
Thu Apr 17 18:29:27 PDT 2008


On Apr 16, 2008, at 10:37 AM, Landon Fuller wrote:

> Do you have a stand-alone test case that works on Apple's JVM, but  
> doesn't work on SoyLatte?

Yes. Attached is a simple JNI test case. To run:

javac HelloWorld.java
javah -jni HelloWorld
gcc -dynamiclib -I$JAVA_HOME/include HelloWorld.c -o libHelloWorld.dylib
java HelloWorld

This works fine under Mac OS X 10.5.2 with the built-in Java 1.5.0_13.  
However, if you then point JAVA_HOME to the location of SoyLatte 1.0.2  
and make SoyLatte's bin directory the first element in the PATH, it  
doesn't work. I get "java.lang.UnsatisfiedLinkError: no HelloWorld in  
java.library.path"

Trevor

-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorld.java
Type: application/octet-stream
Size: 177 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/porters-dev/attachments/20080417/57e07c07/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorld.c
Type: application/octet-stream
Size: 166 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/porters-dev/attachments/20080417/57e07c07/attachment-0001.obj 


More information about the porters-dev mailing list