0

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.

Justin Skiles
  • 9,373
  • 6
  • 50
  • 61
  • Why is it embedded in the browser rather than free-floating? It would probably work consistently as a free floating app. – Andrew Thompson Apr 23 '14 at 07:11
  • Maybe its related to this problem? http://stackoverflow.com/questions/980483/jacob-doesnt-release-the-objects-properly – Lonzak Apr 23 '14 at 07:21
  • @AndrewThompson, it's unfortunately a legacy application that I merely maintain. Can you suggest a path towards 'free floating'? I'm not familiar with that. – Justin Skiles Apr 23 '14 at 12:19
  • Instead of linking to the applet page, write a link directly to the JNLP (using the [Deployment Toolkit Script](http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/depltoolkit_index.html)). – Andrew Thompson Apr 23 '14 at 12:49

0 Answers0