JNI

Scott Kovatch scott.kovatch at oracle.com
Mon Feb 13 14:34:24 PST 2012


On Feb 13, 2012, at 2:10 PM, Michael Hall wrote:

> Not seeing anything in JIRA that seems a real good match.
> Is there any reason JNI that works 1.6 shouldn't work 1.7?
> 
> Mac-User:HalfPipe mjh$ /usr/libexec/java_home -v 1.7 --exec java -cp .:halfpipe.jar TestMonitor
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no hp in java.library.path
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
> 	at java.lang.Runtime.loadLibrary0(Runtime.java:845)
> 	at java.lang.System.loadLibrary(System.java:1084)
> 	at org.cmdline.monitor.CocoaMonitor.<clinit>(CocoaMonitor.java:10)
> 	at TestMonitor.<init>(TestMonitor.java:24)
> 	at TestMonitor.main(TestMonitor.java:16)
> Mac-User:HalfPipe mjh$ /usr/libexec/java_home -v 1.6 --exec java -cp .:halfpipe.jar TestMonitor
> TestMonitor: launched Adobe Reader /Applications/Adobe Reader.app pid 278

What's the name of your JNI library? If it ends in .jnilib it won't work in 1.7. It needs to be .dylib.

Why yes, that did break your application. See 7134701.

- Scott

----------------------------------------
Scott Kovatch
scott.kovatch at oracle.com
Santa Clara/Pleasanton, CA




More information about the macosx-port-dev mailing list