0

I'm in a project and we try to run a jar file, but we get an error we can't solve. We get following error: 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:244)
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
        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 "Thread-0" java.lang.RuntimeException: No toolkit found
        at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
        at java.base/java.lang.Thread.run(Thread.java:830)

I tried many things, but nothing helped. Is there anything I have to configurate at JavaFX set up, or in building the JAR in IntelliJ?

I use:

  • javafx-sdk-13.0.1
  • jdk-13.0.1
  • jre1.8.0_231
  • IntelliJ IDE
ChiefAbi
  • 1
  • 2
  • Are you really compiling with Java 13 but running with Java 8? – Slaw Nov 24 '19 at 14:29
  • It is better to post the error code as text so that others with the same problem can find this question by searching the error! – Dandelion Nov 24 '19 at 14:47
  • Good point Dandelion, edited – ChiefAbi Nov 24 '19 at 14:50
  • @Slaw, as I see JRE 8 is the most recent version, or am I wrong? – ChiefAbi Nov 24 '19 at 14:55
  • The latest version is Java 13.0.1. I'm surprised you're getting the error you are as I'd have expected a `UnsupportedClassVersionError`; code compiled with newer versions of Java cannot be executed by older versions of Java. Are you cross-compiling? Or are you actually executing with Java 13 but don't realize it? In any case, the error indicates the JavaFX libraries are found but that there's a problem initializing the toolkit. Are you running on the same computer that you built the JAR on? – Slaw Nov 24 '19 at 15:03
  • In the project structure java version 13.0.1 is selected, and in Intellij the project can be compiled without any errors. I am not cross-compiling. The computer is the same I built the JAR on. But is there a 'newer' JRE version, or don't I need JRE and JDK at the same time? – ChiefAbi Nov 24 '19 at 15:26
  • Oracle no longer provides a JRE-only distribution, though other vendors may. Regarding the deployment of JavaFX applications, maybe [How to deploy a JavaFX 11 Desktop application with a JRE](https://stackoverflow.com/questions/53453212/), as well as its many linked questions, can help. In case you're not aware since you're new, if you look on the right-hand side of the page you'll see two sections labeled "Linked" and "Related" (though the former is only present if there's actually linked questions). – Slaw Nov 24 '19 at 17:41

1 Answers1

0

I had a very similar error message:

Graphics Device initialization failed for :  es2, sw

The fix was to include the .so files in the JAR.

To do that in IntelliJ, it's:

File > Project Structure > Artifacts > click the "+" symbol > File > and then select all the .so files in the JavaFX folder.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343