As I stated in the title, is it possible to run WebEngine in another thread than FX Application Thread?
Code:
...
WebEngine webEngine = new WebEngine();
Thread thread = new Thread(() ->
webEngine.load("https://www.google.com"));
thread.setDaemon(true);
thread.start();
...
Exception:
Exception in thread "Thread-6" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-6
at com.sun.javafx.tk.Toolkit.checkFxUserThread(Toolkit.java:279)
at com.sun.javafx.tk.quantum.QuantumToolkit.checkFxUserThread(QuantumToolkit.java:423)
at javafx.scene.web.WebEngine.checkThread(WebEngine.java:1243)
at javafx.scene.web.WebEngine.load(WebEngine.java:913)
at sample.Main.lambda$start$0(Main.java:44)
at java.lang.Thread.run(Thread.java:748)
Regarding the Oracle documentation it's not possible.