1

I'm using the next release of Java:

 openjdk version "1.8.0_111"
 OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14)
 OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)

My system is ubuntu 16.04 Lts, I tried to execute a shell script file, using the terminal, I get the next error message

Graphics Device initialization failed for :  es2, 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:227)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:173)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
 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:185)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)

Could you tell me please what would the cause of thsi message.

imadedd
  • 31
  • 1
  • 3
  • Did anyone know the solution for this ? – imadedd Nov 19 '16 at 22:37
  • Some more information would be helpful, especially what GPU you are using and what drivers you have installed for it. – skalarproduktraum Nov 20 '16 at 20:48
  • There is also a related post at http://stackoverflow.com/questions/21185156/javafx-on-linux-is-showing-a-graphics-device-initialization-failed-for-es2-s?rq=1, have you checked that? – skalarproduktraum Nov 21 '16 at 10:37
  • Yes I checked that link and I tried all the proposed solutions but the error still appearing. please do you have another solution to this ? – imadedd Nov 22 '16 at 13:45
  • You'd still need to add some more details, as I asked above: driver (version), what GPU, etc. Have you tried running it with the Oracle JRE? – skalarproduktraum Nov 30 '16 at 16:21

1 Answers1

0

At present, I can provide the exact instructions for Ubuntu 18.x. They may also work on other Debian-based systems. If you're using another OS, perhaps the package names listed below will lead you in the right direction.

First, you need to discover which versions of OpenJFX are available on your distribution. Run this from the command line:

$ apt-cache policy openjfx

In the Version table section, you'll likely see two choices. I currently see 11.0.2+1-1~18.04.2 and 8u161-b12-1ubuntu2 . The version beginning with 11 is the default, even though you've (presumably) installed openjdk-8-jdk. You'll want the version beginning with the number 8. At the time of writing, this is 8u161-b12-1ubuntu2.

To install OpenJFX and the related packages (assuming you're doing development work), first make sure you've uninstalled any Java 11-based packages, because they'll (un)happily coexist with JDK 8, and cause you lots of problems.

$ sudo apt remove openjfx openjfx-source libopenjfx-java libopenjfx-jni

Next, install the correct versions (substituting whatever version you saw listed in the policy query for 8u161-b12-1ubuntu2):

$ sudo apt install openjfx=8u161-b12-1ubuntu2 openjfx-source=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2

Update: I noticed the next day that sudo apt upgrade (or automatic system updates) would "upgrade" the jfx packages I'd so carefully chosen the version for. Here's how to prevent that from happening:

$ sudo apt-mark hold openjfx openjfx-source libopenjfx-java libopenjfx-jni
 openjfx set on hold.  
 openjfx-source set on hold.
 libopenjfx-java set on hold.
 libopenjfx-jni set on hold.

You can run sudo apt showhold any time to list the packages that are being held back.

Having those old-but-good packages installed resolved all the problems for me. I hope they can help you as well.

Sarbjeet Singh
  • 131
  • 1
  • 3