title: JavaFX, OS X, Graphics Device initialization failed for : es2, sw
body: <p>I'm trying to create a JavaFX project in IntelliJ IDEA, but I get errors every time.</p>
  
  <p>After completing tutorial <a href="https://openjfx.io/openjfx-docs/#IDE-Intellij" rel="noreferrer">https://openjfx.io/openjfx-docs/#IDE-Intellij</a>, I've got this:</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 javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
      at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
  Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
      at java.base/java.lang.Thread.run(Thread.java:834)
  Exception in thread "main" java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
  Caused by: java.lang.RuntimeException: No toolkit found
      at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
      ... 5 more
  
  Process finished with exit code 1
  </code></pre>
  
  <p>After adding -Dprism.verbose=true to VM options in IntelliJ IDEA (so my VM options look like this:</p>
  
  <pre><code>--module-path /myPath/javafx-sdk-11.0.1/lib --add-modules=javafx.controls,javafx.fxml -Dprism.verbose=true
  </code></pre>
  
  <p>And then I get this output:</p>
  
  <pre><code>Prism pipeline init order: es2 sw 
  Using Double Precision Marlin Rasterizer
  Using dirty region optimizations
  Not using texture mask for primitives
  Not forcing power of 2 sizes for textures
  Using hardware CLAMP_TO_ZERO mode
  Opting in for HiDPI pixel scaling
  Prism pipeline name = com.sun.prism.es2.ES2Pipeline
  Loading ES2 native library ... prism_es2
  GraphicsPipeline.createPipeline failed for com.sun.prism.es2.ES2Pipeline
  java.lang.UnsatisfiedLinkError: no prism_es2 in java.library.path: [/Users/Lisa/javafx-sdk-11.0.1/lib]
      at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
      at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
      at java.base/java.lang.System.loadLibrary(System.java:1867)
      at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
      at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
      at javafx.graphics/com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:68)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at javafx.graphics/com.sun.prism.es2.ES2Pipeline.&lt;clinit&gt;(ES2Pipeline.java:50)
      at java.base/java.lang.Class.forName0(Native Method)
      at java.base/java.lang.Class.forName(Class.java:315)
      at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
      at java.base/java.lang.Thread.run(Thread.java:834)
  *** Fallback to Prism SW pipeline
  Prism pipeline name = com.sun.prism.sw.SWPipeline
  GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
  java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [/Users/Lisa/javafx-sdk-11.0.1/lib]
      at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
      at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
      at java.base/java.lang.System.loadLibrary(System.java:1867)
      at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
      at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
      at javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at javafx.graphics/com.sun.prism.sw.SWPipeline.&lt;clinit&gt;(SWPipeline.java:41)
      at java.base/java.lang.Class.forName0(Native Method)
      at java.base/java.lang.Class.forName(Class.java:315)
      at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
      at java.base/java.lang.Thread.run(Thread.java:834)
  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 javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
      at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
  Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
      at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
      at java.base/java.lang.Thread.run(Thread.java:834)
  Exception in thread "main" java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
  Caused by: java.lang.RuntimeException: No toolkit found
      at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
      at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
      at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
      ... 5 more
  
  Process finished with exit code 1
  </code></pre>
  
  <p>What should I do to make my project work?</p>