JDK-4127306 : System.exit does not exit when runFinalizersOnExit(true)
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 1.2.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_95
  • CPU: x86
  • Submitted: 1998-04-09
  • Updated: 2015-01-10
  • Resolved: 1999-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.2.0 1.2beta4Fixed
Related Reports
Relates :  
Description

Name: rm29839			Date: 04/09/98

=20
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.swing.JFrame;

class MainWindow extends JFrame
{
=09public MainWindow()
=09{
   =09addWindowListener(new WindowAdapter() {
   =09    public void windowClosing(WindowEvent e) {System.exit(0);}
   =09});
=09}
}

public class jfcapp
{
=09public static void main(String[] args)
=09{
      System.runFinalizersOnExit(true);

=09=09try
=09=09{
=09=09=09MainWindow window =3D new MainWindow();

=09=09=09window.setSize(400, 500);
=09=09=09window.setVisible(true);
=09=09}
=09=09catch (Exception e)
=09=09{
=09=09=09e.printStackTrace();
=09=09}
=09}
}
(Review ID: 27231)
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic FIXED IN: 1.2beta4 INTEGRATED IN: 1.2beta4
14-06-2004

WORK AROUND Name: rm29839 Date: 04/09/98 =20 Remove System.runFinalizersOnExit(true) and it works... ======================================================================
11-06-2004

EVALUATION Reproduced in 1.2beta3 on win32, but not on solaris. JDK-1.2beta4-C segfaults! william.maddox@Eng 1998-04-27 The runFinalizersOnExit(true) method is inherently dangerous: it has the potential to execute finalizers on live objects. This can easily cause all hell to break loose. joshua.bloch@Eng 1998-06-24 After due consideration we've decided to deprecate the offending method. joshua.bloch@Eng 1998-06-29
24-06-1998