Re: Two questions concerning SUN applet classloader
Andrew, first thank you for your response.
Applet 'inconsistencies' between browser versions
and Java versions can pretty much be expected.
Sure, but please look at this example:
====== JavaApp.java ======
import java.awt.Panel;
public class TestApp {
TestObject o;
void neverCalled() {
Panel p=new Panel();
p.add(o);
}
public static void main(String args[]) {}
}
Compile it, delete TestObject.class, run TestApp and you'll get an
"NoClassDefFoundError: TestObject". As you can see here, at least the
problem of the unneeded class request (TestObject.class) is not applet-
related and occurs also in applications. Of course no one would
recognize a delay since all classes have been preloaded.
Have you looked into web start deployment*?
Not very deep... I'm still not sure if Java WebStart can be an
alternative to our html/applet-based website due to the following:
1. In contrast to applets, applications cannot play together with the
HTML framework. Much recoding would have to be done to put everything
into an java application.
2. In a HTML framework, Java applets can be substituted by alternative
non-java technologies like javascript or html. Applications cannot.
b) completely out of the immediate control of a
(sandboxed) applet.
A JarIndex gives you pretty much control over what code modules are
loaded by an applet at a specific time. Of course one need to be
careful to put the right classes into the right jar's. In WebStart
applications, all the code is loaded at startup by default, even if
unneeded. Applets can of course also be versionized, e.g. by using
different URLs or control the SUN cache state using cache* params.
WebStart is a very good thing when dealing with pure applications, but
in our case it does not seem to be a good alternative right now...