Java 11 / Java 17 / Apple silicon support

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Java 11 / Java 17 / Apple silicon support

eazycncn
Hi,

now that it has been two years (and I have a brand new M2 MBP) I thought I would try to upgrade my app to Apple Silicon.

I downloaded latest stable but I get runtime exception

#16:38:57.816 java.lang.UnsatisfiedLinkError: /private/var/folders/6f/6sf54sf50tq91_dnbq8pzq54s_tcs9/T/jogamp_0000/file_cache/jln11354631168340698021/jln12298245173066583045/natives/macosx-universal/libgluegen_rt.dylib: dlopen(/private/var/folders/6f/6sf54sf50tq91_dnbq8pzq54s_tcs9/T/jogamp_0000/file_cache/jln11354631168340698021/jln12298245173066583045/natives/macosx-universal/libgluegen_rt.dylib, 0x0001): tried: '/private/var/folders/6f/6sf54sf50tq91_dnbq8pzq54s_tcs9/T/jogamp_0000/file_cache/jln11354631168340698021/jln12298245173066583045/natives/macosx-universal/libgluegen_rt.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/private/var/folders/6f/6sf54sf50tq91_dnbq8pzq54s_tcs9/T/jogamp_0000/file_cache/jln11354631168340698021/jln12298245173066583045/natives/macosx-universal/libgluegen_rt.dylib' (no such file), '/private/var/folders/6f/6sf54sf50tq91_dnbq8pzq54s_tcs9/T/jogamp_0000/file_cache/jln11354631168340698021/jln12298245173066583045/natives/macosx-universal/libgluegen_rt.


From this post I thought Apple silicon might be supported:

https://forum.jogamp.org/Release-2-4-macOS-version-support-td4042483.html

So, simple question, is Java 17 + Apple Silicon supported or should I build this myself, as per this old thread:

ps://forum.jogamp.org/JOGL-for-Mac-ARM-Silicon-td4040887.html

My Application actually uses Java 11 so bonus points for answering if Java 11 + Apple Silicon is supported.

wbr Kusti

Reply | Threaded
Open this post in threaded view
|

Re: Java 11 / Java 17 / Apple silicon support

eazycncn
Answering the question myself:

I can confirm that following combo works for me (after getting all my ducks in a row):

java --version
>>>                  
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode)

System.out.println(com.jogamp.opengl.JoglVersion.getInstance());
>>>
Package: com.jogamp
Extension Name: com.jogamp
Specification Title: JogAmp Java Bindings Specification
Specification Vendor: JogAmp Community
Specification Version: 2.4
Implementation Title: JogAmp Java Bindings Fat Jar
Implementation Vendor: JogAmp Community
Implementation Vendor ID: com.jogamp
Implementation URL: http://jogamp.org/
Implementation Version: 2.4.0
Implementation Build: 2.4-b952-20230201
Implementation Branch: origin/master
Implementation Commit: 9dce06050a8a607b8c4ab83bd3aba8460d9ca593
Implementation SHA Sources: null
Implementation SHA Classes: null
Implementation SHA Classes-this: null
Implementation SHA Natives: null
Implementation SHA Natives-this: null

MacBook Pro 16", Apple M2 Pro,  32 GB,  2023  
macOS Vetura, Version 13.4.1 (22F82)
Reply | Threaded
Open this post in threaded view
|

Re: Java 11 / Java 17 / Apple silicon support

Sven Gothel
Administrator
May I ask you to share the culprit of the initial failed attempt?
Thank you.

Good that all works out.
Reply | Threaded
Open this post in threaded view
|

Re: Java 11 / Java 17 / Apple silicon support

eazycncn
Mixed jars and then old version JNA which I mistook to a JOGL issue (careless reading of stack trace). Basically once got rid of all old stuff and used new jars for both JOGL and JNA it all worked out of the box. To be clear, I do not think the JOGL and JNA issues were related, just surfaced at the same time and got me side tracked.
Reply | Threaded
Open this post in threaded view
|

Re: Java 11 / Java 17 / Apple silicon support

Sven Gothel
Administrator
Thank you.

Yes, mixing up artifacts, old installed jars etc is probably the most occurring cause for such happenings.