Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to open Pattypan 22.03 (and .02) with M2 Mac #172

Open
trnstlntk opened this issue Mar 2, 2023 · 9 comments
Open

Unable to open Pattypan 22.03 (and .02) with M2 Mac #172

trnstlntk opened this issue Mar 2, 2023 · 9 comments

Comments

@trnstlntk
Copy link

trnstlntk commented Mar 2, 2023

I'm unable to open Pattypan 22.03 on my M2 Mac. Specs are:

  • MacBook Air M2, 2022
  • MacOS 13.1

When attempting to open pattypan.jar by double-clicking, I get:
image

When attempting to open in the Terminal by entering java -jar pattypan\ 22.03.jar I get:

Mar 02, 2023 9:31:59 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @22de69b2'
Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: Can't load library: /Users/fokky/.openjfx/cache/17.0.2-ea/libprism_es2.dylib
java.lang.UnsatisfiedLinkError: Can't load library: /Users/fokky/.openjfx/cache/17.0.2-ea/libprism_es2.dylib
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
	at java.base/java.lang.Runtime.load0(Runtime.java:785)
	at java.base/java.lang.System.load(System.java:1979)
	at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:217)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:197)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:138)
	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:54)
	at com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:63)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:52)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:383)
	at java.base/java.lang.Class.forName(Class.java:376)
	at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.base/java.lang.Thread.run(Thread.java:833)
Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: Can't load library: /Users/fokky/.openjfx/cache/17.0.2-ea/libprism_sw.dylib
java.lang.UnsatisfiedLinkError: Can't load library: /Users/fokky/.openjfx/cache/17.0.2-ea/libprism_sw.dylib
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2398)
	at java.base/java.lang.Runtime.load0(Runtime.java:785)
	at java.base/java.lang.System.load(System.java:1979)
	at com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:217)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:197)
	at com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:138)
	at com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:54)
	at com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:43)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:42)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:383)
	at java.base/java.lang.Class.forName(Class.java:376)
	at com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:92)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.base/java.lang.Thread.run(Thread.java:833)
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:283)
	at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:254)
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:264)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
	at javafx.application.Platform.startup(Platform.java:113)
	at pattypan.Launcher.main(Unknown Source)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
	at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
	at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "main" java.lang.RuntimeException: No toolkit found
	at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:276)
	at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:291)
	at javafx.application.Platform.startup(Platform.java:113)
	at pattypan.Launcher.main(Unknown Source)
@trnstlntk
Copy link
Author

I get exactly the same behavior when trying to open Pattypan 22.02.

@trnstlntk trnstlntk changed the title Unable to open Pattypan 22.03 with M2 Mac Unable to open Pattypan 22.03 (and .02) with M2 Mac Mar 2, 2023
@PythonCoderAS
Copy link

Same behavior with M1. Some digging shows that openjfx/javafx-maven-plugin#112 and https://gluonhq.com/javafx-for-apple-m1/

@PythonCoderAS
Copy link

I just built a version for M1/M2. Built it yourself:

brew install ant # If you don't have ant
cd /tmp/
git clone https://github.com/yarl/pattypan.git
cd pattypan
wget https://download2.gluonhq.com/openjfx/20/openjfx-20_osx-aarch64_bin-sdk.zip
ant

@psubhashish
Copy link

psubhashish commented Apr 5, 2023

22.02 worked actually with an initial hiccup, not related to Pattypan. (updated to add 22.02 tested on Intel Mac and not M2)

@anishsheela
Copy link

anishsheela commented Aug 20, 2023

I am still not able to install it.

anish@ip-192-xxx pattypan % java -jar pattypan.jar
Error: LinkageError occurred while loading main class pattypan.Launcher
java.lang.UnsupportedClassVersionError: pattypan/Launcher has been compiled by a more recent version of the Java Runtime (class file version 64.0), this version of the Java Runtime only recognizes class file versions up to 61.0

@mikima
Copy link

mikima commented Oct 5, 2023

Same error on Mac Intel.

Cloned and compiled it as suggested by @PythonCoderAS but the resulting jar fails when launched.
Screenshot 2023-10-05 at 22 55 45

@PythonCoderAS
Copy link

Same error on Mac Intel.

Cloned and compiled it as suggested by @PythonCoderAS but the resulting jar fails when launched. Screenshot 2023-10-05 at 22 55 45

The instructions are only for M1/M2 macs. For intel, use this URL: https://download2.gluonhq.com/openjfx/20/openjfx-20_osx-x64_bin-sdk.zip

@mikima
Copy link

mikima commented Oct 13, 2023

Thanks. Now as error i get:
Exception in thread "main" java.lang.UnsupportedClassVersionError: pattypan/Launcher has been compiled by a more recent version of the Java Runtime (class file version 65.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I updated Java to the latest version on my mac (Java 8.381) but still doesn't work. I got that Java 8 is also called 52, but then I don't understand how to update it to Java 21 (65)

EDIT: found how to fix it, it is needed to update not Java but JDK. Mac download at this link: https://www.oracle.com/java/technologies/downloads/#jdk21-mac

@VDK
Copy link

VDK commented Feb 25, 2024

Installing the JDK developer kit fixed a similar error for me on a Windows machine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants