Suppose I have 4 browser windows open and in each window I load an applet. Does it mean that there are 4 different JVMs/JREs running or is it that the same runtime can cater to all the different applets.
Originally posted by Ernest Friedman-Hill: Generally it will be just one JVM with carefully-arranged ClassLoaders to keep the applets from knowing about one another.
If that is the case, then why do multiple Java icons appear in the system tray (Windows) as multiple applets are opened? Do they represent multiple JREs getting launched, or do they just indicate a new applet thread getting started? Another interesting thing I noticed was that if i initially opened a browser window and then opened the rest of them by doing a Ctrl+N, thus launching multiple applets, the icons did not increase in number.
Help me out here, please.
author and iconoclast
First, note that I'm talking about the Sun Java Plug-in; if you've got some other way to run applets, then all of this doesn't necessarily apply.
You shouldn't see any Java icons in the system tray, unless your applets are opening windows of their own; in that case, then those windows will have icons like any other windows.
Open up the "Sun Java Console" and press "l" which should list the applet classloaders in use; you should see one classloader for each applet. Hopefully this is enough proof that they're all in the same process.