Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Do multiple applets require multiple JVMs/JREs!

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic