JDK-8143968 : Internal PlatformImpl.startup method should throw ISE if already started
  • Type: Bug
  • Component: javafx
  • Sub-Component: application-lifecycle
  • Affected Version: 9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2015-11-24
  • Updated: 2018-09-05
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
tbdUnresolved
Related Reports
Relates :  
Description
This is a follow-up to JDK-8090585, which provided a public Platform.startup method to start the JavaFX platform. The new public method is documented to throw an IllegalStateException if the platform is already running. The existing internal PlatformImpl.startup method has a different semantic, whereby it turns a call to startup into a runLater if the platform is already running. In order to minimize the risk to existing code, and to SQE tests, we left the current semantic alone for code that calls the internal method directly. We should unify the semantics to avoid confusion such that all uses of this method throw ISE when the platform is already running.

At least the JFXPanel() and FXCanvas initialization code needs to change to only call Platform.startup once (and JFXPanel will likely need to call it in a try/catch block, since the platform might already be running).
Comments
It is also possible that some test applications call the internal method, so that would need to be checked.
04-06-2016

FXCanvas has already been fixed to use the public API and only call Platform.startup once. All that remains is JFXPanel, and maybe the FX deployment code for Web Start applications.
04-06-2016