Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8087496

[IntelliJ] JavaFX application not initialized on FX app thread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • None

      The attached JavaFX program runs correctly on Java 8 when launched from the command line, or run via the NetBeans or Eclipse IDEs. However, when run from the IntelliJ IDE, the following exception occurs:

      Exception in thread "main" java.lang.ExceptionInInitializerError
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:259)
          at com.intellij.rt.execution.application.AppMain.main(AppMain.java:113)
      Caused by: java.lang.IllegalStateException: Not on FX application thread; currentThread = main
          at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:210)
          at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:396)
          at javafx.scene.Scene.<init>(Scene.java:318)
          at javafx.scene.Scene.<init>(Scene.java:207)
          at TestStaticScene.<clinit>(TestStaticScene.java:13)
          ... 3 more

            Unassigned Unassigned
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Imported: