JDK-8118692 : Stage.close() behavior is inconsistent on Mac and Windows
  • Type: Bug
  • Component: javafx
  • Sub-Component: application-lifecycle
  • Affected Version: fx2.1
  • Priority: P4
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2011-12-05
  • Updated: 2015-06-17
  • Resolved: 2011-12-05
Related Reports
Duplicate :  
Description
Run next code snippet on Mac and Windows. Mac wouldn't print "after", but Windows would.

public class StageClose extends Application 
{
    public static void main(String[] args) {
        launch(args);
        System.err.println("after");
    }

    @Override
    public void start(Stage stage) throws Exception {
        stage.show();
        stage.close();
    }
}
Comments
Note that the fix for RT-17777 was pushed to the graphics scrum after b11 integration, so it will be in b12.
02-02-2012

Build: b10 Target build: b11
02-02-2012

This is a known issue caused by a workaround for various crash on exit bugs on Mac. There is already a bug open to track removing this workaround: RT-17777.
05-12-2011