Forum Stats

  • 3,827,736 Users
  • 2,260,814 Discussions


Applet and lazy download nightmare

827523 Member Posts: 2
edited Jan 13, 2011 9:39AM in Java Web Start & JNLP
Hi, I wonder if lazy download are supported when using webstart in applet mode.
I am using jv 1.6.0_23 and here is a extract of my jnlp file :
<jnlp    spec="1.0+"    codebase="/xxx" context="/ivtracer"  href="/xxx/applet.jnlp"  > 
   <jar version="1293701656000" href="aaaa.jar" size="341823" download="eager"/> 
 ...many more eager jars
    <jar version="1293701682000" href="yyyy.jar" size="225992" download="lazy"/> 
 ...many more lazy jars
but when starting applet, all jars get downloaded before my applet is started...
And i have 200 jars to download, but only ~100 needed at startup
I want to use lazy dowwload in order to speed up applet start : all jars are signed and most of the startup time is spend before my applet class is loaded (11 seconds before class is loaded, 14 seconds for full start : only 3 seconds spent in java code I can handle/fix)

I have not found "true" informations about lazy download in applet contexts. Somes posts speak about Class-path attribute, or META-INF/INDEX.LIST (jar i xxx.jar).. but I try many and nothing seems to works.
I also try using an extension with all my lazy jars but it doesnt' works..

Applet is launched by using script and "deployJava.runApplet(attributes, paramets..)" method inside and html page

So I'm a bit pointless ... Do you have any successfully expereince with lazy download mode and applets?

Edited by: user13576185 on 13 janv. 2011 06:36


  • 793415
    793415 Member Posts: 7,279 Bronze Badge
    user13576185 wrote:
    Hi, I wonder if lazy download are supported when using webstart in applet mode. ..
    Is your applet embedded or free floating? If embedded, make it free floating and try again - just to rule out weird applet/browser interactions. Alternatively, add a main() to the applet to turn it into a hybrid application/applet and do some experiments using that.

    Also note that embedded applets should have the codebase attribute left out (note not an empty value - left out).

    As a general point about lazy loading, many things in the code might invoke the 'lazy' Jars to be downloaded eagerly.

    Lastly, please use the code tags (as described on the 'sticky post' at the top of the forum thread listing when posting code or code snippets, XML/HTML/JNLP or input/output. Your original post can still be edited to add them.
This discussion has been closed.