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

WebView can only be created on the FX application thread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • fx2.0
    • javafx
    • None
    • web

      See RT-17716 for a description and test case. If an app constructs a WebView node in its init() method, which is not run on the FX app thread, it will throw the following exception:

      java.lang.IllegalStateException: Not on FX application thread; currentThread = JavaFX-Launcher
      at com.sun.javafx.tk.Toolkit.checkFxUserThread(Unknown Source)
      at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(Unknown Source)
      at com.sun.webpane.sg.prism.InvokerImpl.checkEventThread(Unknown Source)
      at com.sun.webpane.platform.WebPage.<init>(Unknown Source)
      at com.sun.webpane.sg.ImplementationManager.createPage(Unknown Source)
      at com.sun.webpane.sg.ImplementationManager.createPage(Unknown Source)
      at javafx.scene.web.WebEngine.<init>(Unknown Source)
      at javafx.scene.web.WebEngine.<init>(Unknown Source)
      at javafx.scene.web.WebView.<init>(Unknown Source)
      at InitThreadTest.init(InitThreadTest.java:10)
      at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
      at com.sun.javafx.application.LauncherImpl.access$000(Unknown Source)
      at com.sun.javafx.application.LauncherImpl$1.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:722)

            Unassigned Unassigned
            kcr Kevin Rushforth
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Imported: