Recently I converted a Swing application to Webstart. The process was pretty straightforward, but I found that after I close all windows, my application\'s JVM did not termi
I experience the same issue with web start. If i turn off java console, the process does not hang up. Any known bug id from Sun?
The AWT EDT is usually the culprit. For some years now it has had some logic to shutdown when there are no undisposed windows. However, there are recurrent problems with leaks, including within the implementation of AWT and Swing. Therefore, I strongly suggest using System.exit in production releases (you might possibly want to leave it out for some testing to detect leaks).
The WebStart thread should all be daemon when there are no system windows (console, javax.jnlp services and other dialogs) showing.
Consider attaching with jconsole and get a look at what the JVM is doing.
Because of bugs in WebStart, yes. WebStart starts up a "secure thread" for it's own purposes that interacts with the EDT. This SecureThread prevents the automatic termination of the Java process one would expect when all windows and AWT resources are disposed.
For more information see http://www.pushing-pixels.org/?p=232
Webstart starts the Console window (you may be able to disable that). The console window is used to see stdout/err of the webstart process as well as rudimentary log/debug but has the side effect of created a top-level AWT/Swing window. Since the AWT/EDT only ends when the LAST window is disposed, the console window is holding up your application. You should probably call System.exit() to be 100% sure your application exits (unless you can gurantee a certain client configuration, webstart console turned off)