-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.1
-
None
-
unknown
-
solaris_2.4
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);
}
}
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);
}
}
- duplicates
-
JDK-4030718 A program which calls Toolkit.getDefaultToolkit() won't terminate.
-
- Resolved
-