Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JNI, applets and ClassLoader re-use



This is causing me to pull my hair out. Any insight would be appreciated.

So, I've got a signed applet that makes use of a JNI library. I can load this applet once just fine, in any browser (tried IE 5.2.3, Firefox 0.8, Safari 1.21 - all on 10.3.3) and everything will work fine. If I close the applet-containing page, but not the entire browser, then try and reload the exact same page, I get UnsatisfiedLinkError, like so:

java.lang.UnsatisfiedLinkError: Native Library /Users/beau/Library/Application Support/myfolder/blahblahblah.jnilib already loaded in another classloader
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1378)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1309)
at java.lang.Runtime.load0(Runtime.java:693)
at java.lang.System.load(System.java:792)
...(my static code)..
at sun.applet.AppletPanel.run(AppletPanel.java:339)
at java.lang.Thread.run(Thread.java:491)

Am I doing something stupid or is Apple? Java documentation seems to imply this error should be thrown only when the library can't be found. Also, fiddling with the plugin settings (re-cycle classloader, clearing jar cache, etc) doesn't help at all.

-Beau
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Do not post admin requests to the list. They will be ignored.




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.