[BLUEJ-1008] Creating an Object from an FX class fires an exception
This is only if it is the first FX to be initialised.
Steps:
- Create a new JavaFX class (using the template)
- Create an object through calling its constructor (not trough run JavaFX app) an Exception will be fired {quote}java.lang.ExceptionInInitializerError at Test.(Test.java:23) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at bluej.runtime.ExecServer$3.run(ExecServer.java:768) Caused by: java.lang.IllegalStateException: Toolkit not initialized at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:273) at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:268) at com.sun.javafx.application.PlatformImpl.setPlatformUserAgentStylesheet(PlatformImpl.java:550) at com.sun.javafx.application.PlatformImpl.setDefaultPlatformUserAgentStylesheet(PlatformImpl.java:512) at javafx.scene.control.Control.(Control.java:87) ... 6 more {quote}
Issue metadata
- Issue type: Bug
- Priority: Medium