title: Getting the "Graphics Device initialization failed for : es2, sw" error on my M1 MacBook when running a JavaFX Project
body: <p>I am using Zulu openJdk 11 for Arm. I ve tried both in IntelliJ and VsCode butting getting the same exact error.(I'm using JavaFx SDK 11.0.2)
  <a href="https://i.stack.imgur.com/tQfvz.jpg" rel="noreferrer">Error Message (screenshot from visual studio code)</a></p>
  <p>I would really appreciate any help, I've been trying to solve this issue for days but could not find any information for especially Apple Silicon.</p>
  <p>Thanks in advance.</p>
  <p>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 &quot;main&quot; 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</p>
  <p>Code of the project(Copied it from oracle just to test mu setup):</p>
  <pre><code>import javafx.application.Application;
  import javafx.event.ActionEvent;
  import javafx.event.EventHandler;
  import javafx.scene.Scene;
  import javafx.scene.control.Button;
  import javafx.scene.layout.StackPane;
  import javafx.stage.Stage;
   
  public class JavaFX extends Application {
      public static void main(String[] args) {
          launch(args);
      }
      
      @Override
      public void start(Stage primaryStage) {
          primaryStage.setTitle(&quot;Hello World!&quot;);
          Button btn = new Button();
          btn.setText(&quot;Say 'Hello World'&quot;);
          btn.setOnAction(new EventHandler&lt;ActionEvent&gt;() {
   
              @Override
              public void handle(ActionEvent event) {
                  System.out.println(&quot;Hello World!&quot;);
              }
          });
          
          StackPane root = new StackPane();
          root.getChildren().add(btn);
          primaryStage.setScene(new Scene(root, 300, 250));
          primaryStage.show();
      }
  }
  </code></pre>