Paul Reiners
Paul Reiners

Reputation: 7894

AWT-EventQueue thread and AWT-Shutdown thread not shutting down

The AWT-EventQueue thread and AWT-Shutdown thread are not shutting down in our application. Is there a debugging technique for finding out why they are not? Any special things to look for?

Upvotes: 3

Views: 3701

Answers (1)

jfpoilpret
jfpoilpret

Reputation: 10519

If you mean that the JVM doesn't exit properly after closing all windows, then look at the following points:

  • check that ALL windows have been disposed properly, not just simply made invisible; that includes the invisible window created by Swing (or AWT) as the owner of ownerless dialogs. For this you can check Window.getWindows()
  • make sure you have no active Thread (except daemons) after disposing of all windows
  • ensure that your application was not launched by Java Web Start, because in this case you must call System.exit(0) (that's a known bug of JWS)

Hope this helps answer your question.

Besides, there was also this SO question recently about garbage collection of Swing windows.

Upvotes: 6

Related Questions