title: Opening .jar file on mac using JDK 11 fails with RuntimeException
body: <p>I am trying to open a .jar file (<a href="https://github.com/ptrckbnck/SQLChecker/releases" rel="nofollow noreferrer">https://github.com/ptrckbnck/SQLChecker/releases</a>) on my MAC Mojave 10.14 , I need it for my university course. </p>
  
  <p>What I did:</p>
  
  <ul>
  <li>installed java OpenJDK 11 as suggested here <a href="https://solarianprogrammer.com/2018/09/28/installing-openjdk-macos/" rel="nofollow noreferrer">https://solarianprogrammer.com/2018/09/28/installing-openjdk-macos/</a></li>
  </ul>
  
  <p><code>java -version</code>  </p>
  
  <pre><code>openjdk version "11.0.1" 2018-10-16  
  OpenJDK Runtime Environment 18.9 (build 11.0.1+13)  
  OpenJDK 64-Bit Server VM 18.9 (build 11.0.1+13, mixed mode)  
  </code></pre>
  
  <p>But when I run <code>java -jar SQLChecker-1.0.jar</code> I keep on getting the following exception:</p>
  
  <pre><code>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: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:834)
  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:834)
  </code></pre>
  
  <p>I have read related thread <a href="https://stackoverflow.com/questions/52985678/migration-to-jdk-11-javafx-11-giving-runtimeexception">Migration to JDK 11 + JavaFX 11 giving RuntimeException</a> and downloaded also JavaFX 11, namely JavaFX Mac OS X SDK from here <a href="https://gluonhq.com/products/javafx/" rel="nofollow noreferrer">https://gluonhq.com/products/javafx/</a>. I also run the following code:</p>
  
  <pre><code>export PATH_TO_FX=my/path/to/javafx-sdk-11/lib
  </code></pre>
  
  <p>and run HelloWorld test using JavaFX 11 as described here <a href="https://openjfx.io/openjfx-docs/" rel="nofollow noreferrer">https://openjfx.io/openjfx-docs/</a>. Everything worked fine but did not solve my original problem. 
  As was suggested by @Drimux in the related thread some libraries are missing in the OpenJDK distribution. He sad that those probably are libprism_es2.dylib, libprism_sw.dylib, libglass.dylib, libjavafx_font.dylib. So I copied those files from the javafx-sdk-11.0.1/lib into /Library/Java/JavaVirtualMachine/jdk-11.0.1.jdk/Contents/Home/lib and tried to run my .jar file again. Got new exception:</p>
  
  <pre><code>GLFactory.static - Platform: Mac OS X - not available: com.sun.prism.es2.MacGLFactory
  java.lang.ClassNotFoundException: com.sun.prism.es2.MacGLFactory
  at   java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
  at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
  at java.base/java.lang.Class.forName0(Native Method)
  at java.base/java.lang.Class.forName(Class.java:315)
  at com.sun.prism.es2.GLFactory$FactoryLoader.run(GLFactory.java:108)
  at com.sun.prism.es2.GLFactory$FactoryLoader.run(GLFactory.java:100)
  at java.base/java.security.AccessController.doPrivileged(Native Method)
  at com.sun.prism.es2.GLFactory.&lt;clinit&gt;(GLFactory.java:97)
  at com.sun.prism.es2.ES2Pipeline.&lt;clinit&gt;(ES2Pipeline.java:76)
  at java.base/java.lang.Class.forName0(Native Method)
  at java.base/java.lang.Class.forName(Class.java:315)
  at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
  at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
  at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
  at java.base/java.lang.Thread.run(Thread.java:834)
  java.lang.ClassNotFoundException: com.sun.glass.ui.mac.MacPlatformFactory
  at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
  at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
  at java.base/java.lang.Class.forName0(Native Method)
  at java.base/java.lang.Class.forName(Class.java:315)
  at com.sun.glass.ui.PlatformFactory.getPlatformFactory(PlatformFactory.java:42)
  at com.sun.glass.ui.Application.run(Application.java:144)
  at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:258)
  at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:269)
  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:834)
  Failed to load Glass factory class
  Exception in thread "main" java.lang.NullPointerException
  at com.sun.glass.ui.Application.run(Application.java:144)
  at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:258)
  at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:269)
  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:834)
  </code></pre>
  
  <p>This didn't fix the problem. If you need more information please request. 
  What else should I try? </p>