nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

💡AB3 crashes on Mac? Ensure you are using the Azul JDK we have prescribed #146

Open damithc opened 2 weeks ago

damithc commented 2 weeks ago

Mac users, if AB3 crashes upon launch with an error message about an UnsatisfiedLinkError related to JavaFX (an example given below), the first thing to check is to see if you have followed our advisory for Mac users given here.

Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib: dlopen(/Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib, 0x0001): tried: '/Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib' (no such file), '/Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')) java.lang.UnsatisfiedLinkError: /Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib: dlopen(/Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib, 0x0001): tried: '/Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib' (no such file), '/Users/dd/.openjfx/cache/17.0.7/libprism_es2.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')) ...

sayomaki commented 2 weeks ago

Just to add on (for those not keen on using SDKMAN), you have to double check that you are downloading the FX variant under "Java Package" (especially if you are downloading manually)

Screenshot 1

Alternatively, the shortcut link is also given on the instructions page:

Screenshot 2

You may then just download the .dmg installer file and install right away, and this will set the default version of Java on your system to be Java 17 JDK+FX. Be sure to also choose the correct version for your platform (Intel macs: x86 64-bit, Apple Silicon M1/M2/M3: ARM 64-bit)

Hope this helps!