JDK-4125114 : Non-GUI application with awt class doesn't exit automatically in JDK1.2
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: generic
  • CPU: generic
  • Submitted: 1998-04-02
  • Updated: 1998-06-25
  • Resolved: 1998-06-25
Related Reports
Relates :  
Description

Name: moC74494			Date: 04/02/98


Non-GUI application but uses awt classes, doesn't
exit automatically in JDK1.2, it freezes. In JDK1.1.x, that 
application exit automatically even if that doesn't
contain System.exit().

Sample Program:

import java.awt.Color ;

public class ct {

  public int error = 0 ;

  public static void main(String args[]) {
        jnth0010 test = new jnth0010() ;

        test.check_awt_Color() ;

        if (test.error == 0) {
            System.out.println("*** jnth0010 : pass ***") ;
        } else {
            System.out.println("+++ jnth0010 : ng : " +
                                test.error + " errors +++ ") ;
        }
  }

  public void check_awt_Color() {

    Color col1 = new Color(100,100,100) ;
    int r1,g1,b1 ;
    Color col2 ;
    int r2,g2,b2 ;

    col2 = col1.darker() ;
    r1 = (col1.darker()).getRed() ;
    g1 = (col1.darker()).getGreen() ;
    b1 = (col1.darker()).getBlue() ;
    r2 = col2.getRed() ;
    g2 = col2.getGreen() ;
    b2 = col2.getBlue() ;
    if (r1 != r2) error++ ;
    if (g1 != g2) error++ ;
    if (b1 != b2) error++ ;

    col2 = col1.brighter() ;
    r1 = (col1.brighter()).getRed() ;
    g1 = (col1.brighter()).getGreen() ;
    b1 = (col1.brighter()).getBlue() ;
    r2 = col2.getRed() ;
    g2 = col2.getGreen() ;
    b2 = col2.getBlue() ;
    if (r1 != r2) error++ ;
    if (g1 != g2) error++ ;
    if (b1 != b2) error++ ;
  }
}
(Review ID: 27659)
======================================================================

Comments
EVALUATION Name: rrT76497 Date: 06/17/98 18th June/Padmajaya/SIPTech Tested in Win32 and Solaris. The application exits automatically(as it is supposed to do) in jdk1.1.6, however in jdk1.2beta3 the application hangs and doesn't exit on its own. I tried the same in jdk1.2beta4 and here the application exits automatically. ======================================================================
11-06-2004

WORK AROUND Name: moC74494 Date: 04/02/98 Add System.exit(0) code ======================================================================
11-06-2004