Skip to main content

Do applets load JARs on demand?

2 replies [Last post]
cowwoc
Offline
Joined: 2003-08-24

Reading http://tech.slashdot.org/comments.pl?sid=1056231&cid=26047405 there seems to be confusion as to whether applets load all JARs ahead of time or whether they load them on demand.

What's the status of this? Has it changed with Java6 update 10?

Thanks,
Gili

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cowwoc
Offline
Joined: 2003-08-24

With respect to the "Lazy Downloading" section of http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advic...

Was this feature also implemented for applets or does it only work for Java Webstart?

Thank you,
Gili

kbr
Offline
Joined: 2003-06-16

The jar files for old-style applets are downloaded on demand. When a class load request occurs, the jars are searched for that class and any dependent classes that are required to satisfy the load request.

In practice, however, it is often the case that without clever packaging of an applet, all of the jars will end up being downloaded relatively early on in execution.

The addition of support for the JNLP DownloadService works for the new style of JNLP-launched applets introduced in 6u10. http://java.sun.com/javase/6/webnotes/6u10/plugin2/jnlp/index.html