Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6770163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:16:46+00:00 2026-05-26T15:16:46+00:00

I have applet embedded in http page. Applet is signed (as all jars which

  • 0

I have applet embedded in http page. Applet is signed (as all jars which I’m using) and it’s using new java plugin which allows to embed applets in web page with jnlp.
I wanted to lazy load one of the jar files required by my applet, but I cannot make it working.

This is my jnlp file:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" href="/GUI.jnlp">
    <information>
        <title>My Applet</title>
        <vendor>My Company</vendor>
    </information>
    <resources>
        <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>   
        <jar href="/mainGUI.jar" main="true"/>
        <jar href="/external_1.jar"/>
        <jar href="/external_2.jar"/>
        <jar href="/external_3.jar" download="lazy"/>
    </resources>
    <applet-desc
         name="My Applet"
         main-class="com.xformation.GUIAppletMain"
         width="800"
         height="600">
    </applet-desc>
</jnlp>

And html file:

<APPLET width="100%" height="100%" name="My App" code="CompatibilityApplet" archive="mainGUI.jar">
    <param name="jnlp_href" value="GUI.jnlp">
    <script type="text/javascript">
        <!--
            document.write('<param name="server_address" value="' + window.location.href + '">');
        //-->
    </script>
</APPLET>

Also in the mainGUI.jar file I have proper INDEX file generated by ant:

<target name="-do-jar-with-manifest" depends="compile">
    <jar destfile="${dist.jar}"  basedir="${build.classes.dir}" index="true">
        <indexjars>
            <fileset dir="libs">
                <include name="**/external_1.jar"/>
                <include name="**/external_2.jar"/>
                <include name="**/external_3.jar"/>
            </fileset>
        </indexjars>
    </jar>
</target>

From what I see mainGUI.jar file is not even loaded as first one by web browser (actually it’s last one), so INDEX file cannot be properly used to check what files should be downloaded.

Any idea what I’m doing wrong?

//edit

Output from java console:

Here you go:

security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition value null
security: property package.definition new value com.sun.javaws
security: property package.definition value com.sun.javaws
security: property package.definition new value com.sun.javaws,com.sun.deploy
security: property package.definition value com.sun.javaws,com.sun.deploy
security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.access new value sun.,com.sun.xml.internal.ws.,com.sun.xml.internal.bind.,com.sun.imageio.,com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
security: property package.definition value com.sun.javaws,com.sun.deploy,com.sun.jnlp
security: property package.definition new value com.sun.javaws,com.sun.deploy,com.sun.jnlp,org.mozilla.jss
network: Created version ID: 1.6.0.26
network: Created version ID: 1.6
network: Created version ID: 1.6.0.26
network: Created version ID: 1.6
network: Created version ID: 1.6.0.26
network: Created version ID: 1.6
network: Created version ID: 1.6.0.26
network: Created version ID: 1.6
network: Connecting http://192.168.22.124:6500/mainGUI.jnlp with proxy=DIRECT
network: Connecting http://192.168.22.124:6500/ with proxy=DIRECT
network: ResponseCode for http://192.168.22.124:6500/mainGUI.jnlp : 200
network: Encoding for http://192.168.22.124:6500/mainGUI.jnlp : null
network: Sever response: (length: 703, lastModified: Thu Oct 27 13:12:43 CEST 2011, downloadVersion: null, mimeType: text/plain)
network: Downloading resource: http://192.168.22.124:6500/mainGUI.jnlp
    Content-Length: 703
    Content-Encoding: null
network: Wrote URL http://192.168.22.124:6500/mainGUI.jnlp to File C:\Users\pkukielka\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\25\5cfa5999-21379497-temp
network: Disconnect connection to http://192.168.22.124:6500/mainGUI.jnlp
temp: new XMLParser with source:
temp: <?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" href="/mainGUI.jnlp">
    <information>
        <title>xxx</title>
        <vendor>xxx</vendor>
    </information>
    <resources>
        <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>   
        <jar href="/swingx-core-1.6.2.jar"/>
        <jar href="/jfreechart-1.0.13.jar"/>
        <jar href="/axis.jar" download="lazy"/>
        <jar href="/mainGUI.jar" download="eager" main="true"/>
    </resources>
    <applet-desc
         name="LM-X Manager Applet"
         main-class="com.company.mainGUIApplet"
         width="800"
         height="600">
    </applet-desc>
</jnlp>

temp: 

returning ROOT as follows:

<jnlp spec="1.0+" href="/mainGUI.jnlp">
  <information>
    <title>xxx</title>
    <vendor>xxx</vendor>
  </information>
  <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
    <jar href="/swingx-core-1.6.2.jar"/>
    <jar href="/jfreechart-1.0.13.jar"/>
    <jar href="/axis.jar" download="lazy"/>
    <jar href="/mainGUI.jar" download="eager" main="true"/>
  </resources>
  <applet-desc name="xxx" main-class="com.company.mainGUIApplet" width="800" height="600"/>
</jnlp>jnlp
temp: returning LaunchDesc from XMLFormat.parse():

<jnlp spec="1.0+" codebase="http://192.168.22.124:6500/" href="http://192.168.22.124:6500/mainGUI.jnlp">
  <information>
    <title>xxx</title>
    <vendor>xxx</vendor>
    <homepage href="null"/>
  </information>
  <update check="timeout" policy="always"/>
  <resources>
    <java href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
    <jar href="http://192.168.22.124:6500/swingx-core-1.6.2.jar" download="eager" main="false"/>
    <jar href="http://192.168.22.124:6500/jfreechart-1.0.13.jar" download="eager" main="false"/>
    <jar href="http://192.168.22.124:6500/axis.jar" download="lazy" main="false"/>
    <jar href="http://192.168.22.124:6500/mainGUI.jar" download="eager" main="true"/>
  </resources>
  <applet-desc name="xxx" main-class="com.company.mainGUIApplet" documentbase="http://192.168.22.124:6500/" width="800" height="600"/>
</jnlp>
basic: Plugin2ClassLoader.addURL2 called for http://192.168.22.124:6500/mainGUI.jar
basic: Plugin2ClassLoader.addURL2 called for http://192.168.22.124:6500/swingx-core-1.6.2.jar
basic: Plugin2ClassLoader.addURL2 called for http://192.168.22.124:6500/jfreechart-1.0.13.jar
basic: Plugin2ClassLoader.addURL2 called for http://192.168.22.124:6500/axis.jar
basic: Plugin2ClassLoader.drainPendingURLs addURL called for http://192.168.22.124:6500/mainGUI.jar
basic: Plugin2ClassLoader.drainPendingURLs addURL called for http://192.168.22.124:6500/swingx-core-1.6.2.jar
basic: Plugin2ClassLoader.drainPendingURLs addURL called for http://192.168.22.124:6500/jfreechart-1.0.13.jar
basic: Plugin2ClassLoader.drainPendingURLs addURL called for http://192.168.22.124:6500/axis.jar
network: No Custom Progress jar
network: Connecting http://192.168.22.124:6500/axis.jar with proxy=DIRECT
network: Downloading resource: http://192.168.22.124:6500/axis.jar
    Content-Length: 1 972 163
    Content-Encoding: null
security: Blacklist revocation check is enabled
network: LaunchDownload: concurrent downloads from LD: 4
network: Total size to download: -1
network: Connecting http://192.168.22.124:6500/jfreechart-1.0.13.jar with proxy=DIRECT
network: Connecting http://192.168.22.124:6500/swingx-core-1.6.2.jar with proxy=DIRECT
network: Connecting http://192.168.22.124:6500/mainGUI.jar with proxy=DIRECT
network: Connecting http://192.168.22.124:6500/ with proxy=DIRECT
network: Connecting http://192.168.22.124:6500/ with proxy=DIRECT
network: Downloading resource: http://192.168.22.124:6500/jfreechart-1.0.13.jar
    Content-Length: 1 479 993
    Content-Encoding: null
network: Validating http://192.168.22.124:6500/jfreechart-1.0.13.jar , version null...
network: Downloaded http://192.168.22.124:6500/jfreechart-1.0.13.jar: null
network: Download Progress: jarsDone: 1
network: Downloading resource: http://192.168.22.124:6500/mainGUI.jar
    Content-Length: 881 140
    Content-Encoding: null
network: Validating http://192.168.22.124:6500/mainGUI.jar , version null...
network: Downloaded http://192.168.22.124:6500/mainGUI.jar: null
network: Download Progress: jarsDone: 2
network: Downloading resource: http://192.168.22.124:6500/swingx-core-1.6.2.jar
    Content-Length: 1 569 320
    Content-Encoding: null
network: Validating http://192.168.22.124:6500/swingx-core-1.6.2.jar , version null...
network: Downloaded http://192.168.22.124:6500/swingx-core-1.6.2.jar: null
network: Download Progress: jarsDone: 3
network: Created version ID: 1.6+
network: Created version ID: 1.6.0.26
network: Created version ID: 1.6.0.26
network: Created version ID: 1.6
basic: LaunchDesc location: http://192.168.22.124:6500/mainGUI.jnlp
network: Created version ID: 1.0+
network: Created version ID: 6.0.18
basic: passing security checks; secureArgs:true, allSigned:false
basic: continuing launch in this VM
(...) <- here 500 lines with loaded classses listed, nothing form axis library

One update:
Since I’m running this example with my own web server I ran it with debuger and just skip serving library which should be loading lazily (I just returned empty file).
Then I got this error:

java.io.FileNotFoundException: http://192.168.22.124:6500/axis.jar?version-id=1.0
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getJarFileWithoutCache(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getJarFileWithoutCache(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCachedJarFile(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCachedJarFile(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.downloadResources(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.prepareLaunchFile(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.loadJarFiles(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

The line which seems very suspicious to me is:

at com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source)

So what, looks like all lazy downloads are just ignored? Question is why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:16:47+00:00Added an answer on May 26, 2026 at 3:16 pm

    Ok, I found the answer.

    After looking at
    http://javasourcecode.org/html/open-source/jdk/jdk-6u23/com/sun/javaws/LaunchDownload.java.html I noticed this line:

      868   // We will eagerly download all lazy resources that have already been cached too.
      869   // Otherwise, we might not detect that an update have happend
    

    Well, I was sure my cache is cleared, because on my developer machine I have it disabled completely. Just for curious I enabled it again, and tried to run my applet.

    And it works now.

    So: BEWARE, LAZY LOADING DOESN’T WORK WITH CACHE DISABLED.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java applet embedded into a web page which generates a file
I have embedded the signed applet in following html page, <input type=hidden name=xmldata id=xmldata
I have an applet that communicates with a servlet using Http (Not sockets). Currently,
We have a Java Applet built using AWT. This applet lets you select pictures
I am using applet that is embedded in my web page. I am using
I have a java applet in which I have to display a large amount
I have an applet which runs in a browser and is called from Javascript.
Let's suppose I have an applet running within a page in a browser. What
I have a Java Applet that uses AWT. In some (rare) circumstances, the platform
I have a Java applet that is meant to run only on Windows. (It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.