Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Do multiple applets require multiple JVMs/JREs!

 
Robin Sharma
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys!

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.

Thanks.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Generally it will be just one JVM with carefully-arranged ClassLoaders to keep the applets from knowing about one another.
 
Robin Sharma
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


Hey Ernest!

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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic