After installing JDK, unable to run .jar

OS-50101 :

During a course it was installed JDK on my computer in order to be able to run eXist database. After this, after executing the command java -jar fileName.jar I get 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:222) 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:835) 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 "main" 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:835)

Windows 10

java -version

openjdk version "12.0.2" 2019-07-16 OpenJDK Runtime Environment Adopt

OpenJDK (build 12.0.2+10) OpenJDK 64-Bit Server VM Adopt

OpenJDK (build 12.0.2+10, mixed mode, sharing)

YCF_L :

From your log its clear that you'r using JDK-12, and it seems that your jar is developed with JDK-8 where this version of JDK contains the JavaFx library.

But Oracle is removing JavaFX from the JDK-11, so it is no longer present in the JDK-11+, instead you have two solutions :

  1. use JDK-8 which contains this JavaFx,
  2. or include the JavaFx package or dependency in your project check the link

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=138768&siteId=1
Recommended