I have an applet that is loaded via Java Web Start in a browser. This applet uses a few native libraries for things like Microsoft Office Interop and Active Directory communication.
Here's the jnlp
:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.5+">
<information>
<title>My Applet</title>
<vendor>My Vendor</vendor>
</information>
<security>
<all-permissions/>
</security>
<resources os="Windows">
<!-- Application Resources -->
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" />
<jar href="applets/MyApplet.jar" main="true" />
<nativelib href="applets/jacob.jar"/>
<nativelib href="applets/com4j.jar"/>
</resources>
<applet-desc
name="My Applet"
main-class="com.applet.MyApplet"
width="770"
height="825">
</applet-desc>
</jnlp>
When the applet is loaded, everything is fine and the libraries work as expected. However, if I close the applet and then re-open it, I get this error in the Java Console:
UnsatisfiedLinkError: no jacob in java.library.path
UnsatisfiedLinkError: no com4j in java.library.path
If I clear the Java cache, it then begins working again. However, it works only for one more time, after which it fails with the same error until I clear the Java cache again.