Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4014091

AWT threads don't quit when you expect them to.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.1
    • client-libs
    • 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);
          }
      }

            ehawkessunw Eric Hawkes (Inactive)
            kwalrathsunw Kathy Walrath (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: