-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
8
-
None
I have a class that extends javafx.scene.control.Control. In the Control class there's a static block that calls another static block in PlatformImpl that causes an IllegalStateException.
Because it's a static block it will always (you never know exactly when actually) be executed before the toolkit can be started. This makes it impossible to run any javafx application.
Tested on 8b113 & 8b106
Caused by: java.lang.IllegalStateException: Toolkit not initialized
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:272)
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.setPlatformUserAgentStylesheet(PlatformImpl.java:609)
at com.sun.javafx.application.PlatformImpl.setDefaultPlatformUserAgentStylesheet(PlatformImpl.java:571)
at javafx.scene.control.Control.<clinit>(Control.java:81)
... 26 more
Because it's a static block it will always (you never know exactly when actually) be executed before the toolkit can be started. This makes it impossible to run any javafx application.
Tested on 8b113 & 8b106
Caused by: java.lang.IllegalStateException: Toolkit not initialized
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:272)
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:267)
at com.sun.javafx.application.PlatformImpl.setPlatformUserAgentStylesheet(PlatformImpl.java:609)
at com.sun.javafx.application.PlatformImpl.setDefaultPlatformUserAgentStylesheet(PlatformImpl.java:571)
at javafx.scene.control.Control.<clinit>(Control.java:81)
... 26 more
- duplicates
-
JDK-8102211 Change FX startup such that the Application is initialized and constructed in the FX application thread
-
- Resolved
-