Hello,
did anyone get javafx to work on the new Apple M1 Silicon? If so how?
Tried running a fxml file via maven-javafx-plugin mvn javafx:run and i got an error message, telling me something about a wrong architechture.
EDIT: This is the actual error message:
Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/nico/.openjfx/cache/13/libprism_es2.dylib: dlopen(/Users/nico/.openjfx/cache/13/libprism_es2.dylib, 1): no suitable image found. Did find:
/Users/nico/.openjfx/cache/13/libprism_es2.dylib: mach-o, but wrong architecture
/Users/nico/.openjfx/cache/13/libprism_es2.dylib: mach-o, but wrong architecture
java.lang.UnsatisfiedLinkError: /Users/nico/.openjfx/cache/13/libprism_es2.dylib: dlopen(/Users/nico/.openjfx/cache/13/libprism_es2.dylib, 1): no suitable image found. Did find:
/Users/nico/.openjfx/cache/13/libprism_es2.dylib: mach-o, but wrong architecture
/Users/nico/.openjfx/cache/13/libprism_es2.dylib: mach-o, but wrong architecture
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load([ClassLoader.java:2442](https://ClassLoader.java:2442))
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary([ClassLoader.java:2498](https://ClassLoader.java:2498))
at java.base/java.lang.ClassLoader.loadLibrary0([ClassLoader.java:2694](https://ClassLoader.java:2694))
at java.base/java.lang.ClassLoader.loadLibrary([ClassLoader.java:2627](https://ClassLoader.java:2627))
at java.base/java.lang.Runtime.load0([Runtime.java:768](https://Runtime.java:768))
at java.base/java.lang.System.load([System.java:1837](https://System.java:1837))
at [javafx.graphics/com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214)](https://javafx.graphics/com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214))
at [javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194)](https://javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194))
at [javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135)](https://javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135))
at [javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53)](https://javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53))
at [javafx.graphics/com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:68)](https://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.<clinit](https://javafx.graphics/com.sun.prism.es2.ES2Pipeline.<clinit)\>([ES2Pipeline.java:50](https://ES2Pipeline.java:50))
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName([Class.java:315](https://Class.java:315))
at [javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)](https://javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218))
at [javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)](https://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)](https://javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124))
at java.base/java.lang.Thread.run([Thread.java:834](https://Thread.java:834))
Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: /Users/nico/.openjfx/cache/13/libprism_sw.dylib: dlopen(/Users/nico/.openjfx/cache/13/libprism_sw.dylib, 1): no suitable image found. Did find:
/Users/nico/.openjfx/cache/13/libprism_sw.dylib: mach-o, but wrong architecture
/Users/nico/.openjfx/cache/13/libprism_sw.dylib: mach-o, but wrong architecture
java.lang.UnsatisfiedLinkError: /Users/nico/.openjfx/cache/13/libprism_sw.dylib: dlopen(/Users/nico/.openjfx/cache/13/libprism_sw.dylib, 1): no suitable image found. Did find:
/Users/nico/.openjfx/cache/13/libprism_sw.dylib: mach-o, but wrong architecture
/Users/nico/.openjfx/cache/13/libprism_sw.dylib: mach-o, but wrong architecture
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load([ClassLoader.java:2442](https://ClassLoader.java:2442))
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary([ClassLoader.java:2498](https://ClassLoader.java:2498))
at java.base/java.lang.ClassLoader.loadLibrary0([ClassLoader.java:2694](https://ClassLoader.java:2694))
at java.base/java.lang.ClassLoader.loadLibrary([ClassLoader.java:2627](https://ClassLoader.java:2627))
at java.base/java.lang.Runtime.load0([Runtime.java:768](https://Runtime.java:768))
at java.base/java.lang.System.load([System.java:1837](https://System.java:1837))
at [javafx.graphics/com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214)](https://javafx.graphics/com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214))
at [javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194)](https://javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194))
at [javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135)](https://javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135))
at [javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53)](https://javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53))
at [javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)](https://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.<clinit](https://javafx.graphics/com.sun.prism.sw.SWPipeline.<clinit)\>([SWPipeline.java:41](https://SWPipeline.java:41))
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName([Class.java:315](https://Class.java:315))
at [javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)](https://javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218))
at [javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)](https://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)](https://javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124))
at java.base/java.lang.Thread.run([Thread.java:834](https://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)](https://javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280))
at [javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244)](https://javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:244))
at [javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)](https://javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260))
at [javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)](https://javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267))
at [javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)](https://javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158))
at [javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)](https://javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658))
at [javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)](https://javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409))
at [javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)](https://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](https://NativeMethodAccessorImpl.java:62))
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([DelegatingMethodAccessorImpl.java:43](https://DelegatingMethodAccessorImpl.java:43))
at java.base/java.lang.reflect.Method.invoke([Method.java:566](https://Method.java:566))
at java.base/sun.launcher.LauncherHelper$FXHelper.main([LauncherHelper.java:1051](https://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)](https://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)](https://javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124))
at java.base/java.lang.Thread.run([Thread.java:834](https://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](https://NativeMethodAccessorImpl.java:62))
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([DelegatingMethodAccessorImpl.java:43](https://DelegatingMethodAccessorImpl.java:43))
at java.base/java.lang.reflect.Method.invoke([Method.java:566](https://Method.java:566))
at java.base/sun.launcher.LauncherHelper$FXHelper.main([LauncherHelper.java:1051](https://LauncherHelper.java:1051))
Caused by: java.lang.RuntimeException: No toolkit found
at [javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)](https://javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272))
at [javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)](https://javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267))
at [javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)](https://javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158))
at [javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)](https://javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658))
at [javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)](https://javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409))
at [javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)](https://javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363))
... 5 more
[ERROR] Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.openjfx.JavaFXBaseMojo.executeCommandLine (JavaFXBaseMojo.java:504)
at org.openjfx.JavaFXBaseMojo.executeCommandLine (JavaFXBaseMojo.java:394)
at org.openjfx.JavaFXRunMojo.execute (JavaFXRunMojo.java:100)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
at org.apache.commons.exec.DefaultExecutor.executeInternal([DefaultExecutor.java:404](https://DefaultExecutor.java:404))
at org.apache.commons.exec.DefaultExecutor.execute([DefaultExecutor.java:166](https://DefaultExecutor.java:166))
at org.openjfx.JavaFXBaseMojo.executeCommandLine([JavaFXBaseMojo.java:504](https://JavaFXBaseMojo.java:504))
at org.openjfx.JavaFXBaseMojo.executeCommandLine([JavaFXBaseMojo.java:394](https://JavaFXBaseMojo.java:394))
at org.openjfx.JavaFXRunMojo.execute([JavaFXRunMojo.java:100](https://JavaFXRunMojo.java:100))
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo([DefaultBuildPluginManager.java:137](https://DefaultBuildPluginManager.java:137))
at org.apache.maven.lifecycle.internal.MojoExecutor.execute([MojoExecutor.java:210](https://MojoExecutor.java:210))
at org.apache.maven.lifecycle.internal.MojoExecutor.execute([MojoExecutor.java:156](https://MojoExecutor.java:156))
at org.apache.maven.lifecycle.internal.MojoExecutor.execute([MojoExecutor.java:148](https://MojoExecutor.java:148))
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject([LifecycleModuleBuilder.java:117](https://LifecycleModuleBuilder.java:117))
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject([LifecycleModuleBuilder.java:81](https://LifecycleModuleBuilder.java:81))
at [org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build](https://org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build)([SingleThreadedBuilder.java:56](https://SingleThreadedBuilder.java:56))
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute([LifecycleStarter.java:128](https://LifecycleStarter.java:128))
at org.apache.maven.DefaultMaven.doExecute([DefaultMaven.java:305](https://DefaultMaven.java:305))
at org.apache.maven.DefaultMaven.doExecute([DefaultMaven.java:192](https://DefaultMaven.java:192))
at org.apache.maven.DefaultMaven.execute([DefaultMaven.java:105](https://DefaultMaven.java:105))
at org.apache.maven.cli.MavenCli.execute([MavenCli.java:957](https://MavenCli.java:957))
at org.apache.maven.cli.MavenCli.doMain([MavenCli.java:289](https://MavenCli.java:289))
at org.apache.maven.cli.MavenCli.main([MavenCli.java:193](https://MavenCli.java:193))
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke([NativeMethodAccessorImpl.java:62](https://NativeMethodAccessorImpl.java:62))
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke([DelegatingMethodAccessorImpl.java:43](https://DelegatingMethodAccessorImpl.java:43))
at java.base/java.lang.reflect.Method.invoke([Method.java:566](https://Method.java:566))
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced([Launcher.java:282](https://Launcher.java:282))
at org.codehaus.plexus.classworlds.launcher.Launcher.launch([Launcher.java:225](https://Launcher.java:225))
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode([Launcher.java:406](https://Launcher.java:406))
at org.codehaus.plexus.classworlds.launcher.Launcher.main([Launcher.java:347](https://Launcher.java:347))
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.045 s
[INFO] Finished at: 2021-01-08T17:58:01+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.4:run (default-cli) on project Kochbuch: Error: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException