JDK-8120668 : Glasswindow system does not keep VM alive on Mac
  • Type: Bug
  • Component: javafx
  • Sub-Component: application-lifecycle
  • Affected Version: fx2.0.2
  • Priority: P4
  • Status: Resolved
  • Resolution: Not an Issue
  • Submitted: 2011-11-16
  • Updated: 2015-06-17
  • Resolved: 2012-02-23
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
fx2.1Resolved
Related Reports
Blocks :  
Description
If I start the FX platform in an embedded way (i.e. not using Application.launch()) and I have no other non daemon threads running, the VM is shutting down after a few seconds (the FX UI is shown before and works). Same configuration works on windows, i.e. no shutdown of the VM occurs. Adding a "Keep-Alive-Thread" that does nothing but is just a non daemon thread running, helps we work around this issue on MacOS X.

This should work out of the box in some future release I think.,
Comments
Now that RT-17777 is fixed, the Application life-cycle on Mac should behave identically to that of Windows. Namely, the JavaFX Application Thread will terminate the FX runtime and shutdown, after calling Application.stop(). At that point JavaFX will have no active non-daemon threads so the JVM will exit unless the application itself has a non-daemon thread.
23-02-2012

I think I misread the description the first time, so I am not certain that this is hitting the System.exit() case after all. In any case, it still makes sense to look into it after RT-17777 is implemented to remove the System.exit() workaround.
16-11-2011

This isn't a Glass issue, but an App Model issue. And currently (to work around other issues) we have an explicit call to System.exit() which will be removed once the related bugs are fixed.
16-11-2011