JDK-4014091 : AWT threads don't quit when you expect them to.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.4
  • CPU: unknown
  • Submitted: 1996-11-11
  • Updated: 2002-04-15
  • Resolved: 2002-04-15
Related Reports
Duplicate :  
Description
Once an application creates an AWT component such as a Frame, then
even if all AWT components go away, the AWT threads still exist and
run.  This means that even if a program exits its main method, the
program will continue to run until some bit of code calls System.exit.

Below is a test case.  The following application doesn't exit unless
you uncomment the System.exit call.

import java.awt.*;
public class Test
{
    public static void main(String argv[])
    {
	Frame f = new Frame();
	f.show();
	f.hide();
	f = null;
	//System.exit(0);
    }
}

Comments
EVALUATION We've found several applications that unfortunately rely on that behavior, and therefore can't correct this problem because of the need for backwards compatibility.
11-06-2004