java.awt.Toolkit.getDefaultToolkit prevents main from exiting

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.1
    • Component/s: client-libs
    • None
    • sparc
    • solaris_2.5



      Name: saC57035 Date: 02/10/97


      This bug was found by St.Petersburg Java SQE team (by Dmitry A. Silaev).

      If method java.awt.Toolkit.getDefaultToolkit is called inside of 'main' body,
      finishing 'main' does not return to system prompt.
      System.exit, however, works fine in this case.

      Here is the example demonstrating the bug:
      ______________________ Test.java _________________________________
      import java.awt.*;
          
      class Test {

      public static void main(String[] args){
          System.out.println(Toolkit.getDefaultToolkit());
          System.out.println("OK");
      }

      }
      ______________________ Output ________________________________________
      % java Test
      sun.awt.motif.MToolkit@ee3009b0
      OK
      ^C%
      ______________________________________________________________________

      ======================================================================

            Assignee:
            Unassigned
            Reporter:
            Stanislav Avzan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: