1

I am on Win10, got Eclipse. For a school project, I have to use JavaFX on Java SE 1.8 (it's mandatory, I can't replace that by a more recent version).

First of all I had trouble installing it. I finally managed to get rid of import errors by installing E(fx)clipse from the eclipse marketplace, and by manually adding de the jfxrt.jar to my project.

But now, running the project gives me the following error :

Graphics Device initialization failed for :  d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
    at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
    at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:242)
    at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:248)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
    at javafx.embed.swing.JFXPanel.lambda$initFx$2(JFXPanel.java:232)
    at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
    at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
    ... 1 more
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: No toolkit found
    at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
    at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
    at javafx.embed.swing.JFXPanel.lambda$initFx$2(JFXPanel.java:232)
    at java.base/java.lang.Thread.run(Thread.java:830)

I tried to Google it, but I don't really understand what's going on, and I could not find a solution to this issue.

my java -version is :

java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

and my javac -version is :

javac 13.0.2
kleopatra
  • 51,061
  • 28
  • 99
  • 211
Kal8578
  • 51
  • 1
  • 8
  • JavaFX is not included in Java 11 and later: you are running this with Java 13. You can download a Java 8 version from Oracle [here](https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html). (FWIW, I find it pretty crazy that you would be forced to learn on something so out of date.) Then in Eclipse, when you create a new project, be sure to specify Java 8 for your JRE. – James_D Apr 10 '20 at 15:28
  • Thank you, it worked. I don't really understand why adding jfxrt as a separate jar and running javaSE 1.8 couldn't prevent the error from happening and why reinstalling another jdk did the job, but anyway it works. – Kal8578 Apr 10 '20 at 19:10
  • 1
    Well, you weren't running JavaSE 8, according to your output... So something was amiss. But I'm glad you got it working. FWIW if you do want to use more recent versions of Java with JavaFX in the future, I recommend using the Maven approach detailed [here](https://openjfx.io/openjfx-docs/) (e.g. JavaFX and Eclipse -> modular with Maven). – James_D Apr 10 '20 at 19:17
  • Thank you for the advice, I bookmarked your link in my browser. I really don't get how Eclipse wasn't running Java SE 8 while I asked it to do so when creating my project (I had also tried openjdk 8, same error). Anyways, it's fixed, that's what matters. – Kal8578 Apr 11 '20 at 06:39

0 Answers0