JDK-8128907 : stage.hide() closes the app on mac
  • Type: Bug
  • Component: javafx
  • Sub-Component: application-lifecycle
  • Affected Version: fx2.0.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2011-11-02
  • Updated: 2015-06-17
  • Resolved: 2011-11-03
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Method stage.hide() makes JavaFX call System.exit(). This is Windows behavior, but on the mac an application should keep running no matter how many windows the user closes and only quit once the user quits the app.
Comments
Calling System.exit is a workaround (see RT-15601) for various Mac crash/hang bugs. Once all underlying issues are fixed, we will remove this workaround (see RT-17777), and no longer call System.exit(). At this point an application on Mac will behave exactly as it does on Windows, which is that after the last Stage is closed, the JavaFX Launcher will call the Application.stop() method and then terminate the JavaFX application thread. We will not do something different on Mac than we do on Windows. There is a feature request to suppress this automatic shutdown -- RT-15011. We will consider this for a future release.
03-11-2011