tags:

views:

257

answers:

2

I have a JApplet which I contains various Swing components. It also starts a couple of extra threads in the init() and generally does other pretty standard applet-y things.

If I close the browser window containing the Applet, the JRE doesn't die (the icon remains in the system tray) until all the browser's windows have been closed (ie the browser has completely ended and disappears from the task manager)

Is this the expected behaviour or should the JRE end when the browser window enclosing the Applet closes?

I have a destroy() method, but (at present) it only stops the extra threads I started in the init() method. Should I be doing more in here maybe? Are there any other best-practises I should be following?

If you'd like any more info, please let me know in the comments.

:-)

+3  A: 

I believe the JRE is loaded as a plugin to the browser, and the icon is supposed to remain in the system tray until the browser ends.

The reasoning behind this is that if you load one applet, leaving the JRE running will accelerate future applets' loading times.

warren
A: 

Hmmm.... was hoping there was to kill it but I guess not?

cagcowboy
nope - you don't get to control the JRE (that way) unless you're a standalone app
warren