Hello,
I have an unsigned Java applet consisting of several jar files.
Currently all jar files are downloaded on applet's startup. Is there
any chance to download the jar files only when they are really needed?
Thank you for any hint.
Are you sure that all the JARs are being downloaded on startup? In general,
a JAR is only downloaded when a class in that archive is accessed.
Therefore, to delay this until absolutely necessary you need to program
against an interface and then instantiate the required class using
Class.forName() when it is first accessed. You can even configure things so
that only the actual applet class is in one JAR which is downloaded on
startup and have all the other classes in other JARs that are only
downloaded as required.
If you have several JARs you can index them to speed up the process of
locating the required classes when required. Look at the documentation for
the jar command. I think it's jar -i.
--
And loving it,
-Qu0ll (Rare, not extinct)
_________________________________________________
(e-mail address removed)
[Replace the "SixFour" with numbers to email me]