H
Hal Vaughan
I have a program that needs to be able to run as an application and an
applet. One big concern with it running as an applet is loading time.
There are a number of classes that the program will need as an application
that deal with things handled by the CGI backend on the applet. I'm most
concerned about who Java and browser handle loading classes in an applet.
Do they load all the classes when the applet is invoked, or when classes
are first used?
If I have:
if (isApplet) {
//Do applet stuff here
} else {
MyClass mc = new MyClass;
mc.verify(userName, passWord);
mc.output("results");
}
(Of course, isApplet would only be true if the program were running as an
applet.)
When the program is run as an applet, I know MyClass has to be available,
but will it also be loaded? If so, is there a way to get around it and not
load classes unless the program actually calls them?
Thanks for any background on this.
Hal
applet. One big concern with it running as an applet is loading time.
There are a number of classes that the program will need as an application
that deal with things handled by the CGI backend on the applet. I'm most
concerned about who Java and browser handle loading classes in an applet.
Do they load all the classes when the applet is invoked, or when classes
are first used?
If I have:
if (isApplet) {
//Do applet stuff here
} else {
MyClass mc = new MyClass;
mc.verify(userName, passWord);
mc.output("results");
}
(Of course, isApplet would only be true if the program were running as an
applet.)
When the program is run as an applet, I know MyClass has to be available,
but will it also be loaded? If so, is there a way to get around it and not
load classes unless the program actually calls them?
Thanks for any background on this.
Hal