Closed itstrueitstrueitsrealitsreal closed 2 months ago
@itstrueitstrueitsrealitsreal Thanks for investigating the Mac ARM issue. BTW, shouldn't there be a change to build.gradle as well? Is it possible that you didn't change build.gradle, and therefore, used Java 11 to build the JAR?
@damithc Thanks for pointing that out, it seems I missed that out. I have updated sourceCompatibility
and targetCompatability
in build.gradle
to reflect this, and updated the download link to the jar file. I have also verified that I am still able to build the jar file without any additional issues.
In addition, I'd like to demonstrate how to see the full list of Java SDKs that SDKMAN offers for download, for others that may not be familiar with its usage.
After downloading SDKMAN, enter the command sdk install java
followed by pressing tab and wait for the full list of Java SDKs to be displayed on screen. It may take a few seconds, but this is what the list should look like.
After selecting the desired version, press Enter and wait for the download and installation to complete. It may take around 3-5 minutes, depending on the strength of your connection. You can then choose to set it as the default version, or not.
After that, if you wish to switch between versions, you can run the command sdk use
followed by tab to see all the installed SDKs on your system, and choose the desired version.
Similarly, if you wish to set one of the installed SDKs as a default, you can run the command sdk default
followed by tab to see all the installed SDKs on your system, and choose the desired version.
For any other use cases, you can refer to SDKMAN's documentation or run the command sdk help
to see a list of all the commands.
Tested on Mac Silicon with JDK-FX 17.0.11.fx-zulu, and working.
Steps I followed:
java -jar MacSilicon-KennethSeet.jar
.Results: Everything is functioning as expected.
Screenshots:
Tested on Mac Silicon with JDK-FX 17.0.11.fx-zulu, and working.
Steps and results are identical to above.
Tested on Windows 11, and working.
Steps I followed:
Smoke-tested on Windows 11 using Oracle OpenJDK version 17.0.10 on Windows Powershell Terminal in the same manner as @teoks0199 and ensured all functionalities were in place.
Tested on Mac Silicon with JDK-FX 17.0.11.fx-zulu, and working.
Steps: Downloaded the JAR file from the PR. Switched to JDK-FX 17.0.11.fx-zulu Ran the JAR file using java -jar MacSilicon-KennethSeet.jar. Performed a smoke test to check basic functionality. Results: Everything is functioning as expected.
Screenshots:
Tested on Ubuntu 22.04.4 LTS with zulu jdk 17.0.11. JAR is working fine.
Steps followed:
Downloaded the JAR file from the release.
Ran the JAR file using java -jar MacSilicon-KennethSeet.jar
.
Performed a smoke test to check basic functionality.
Results: Everything is functioning as expected.
Tested on MacSilicon with JDK-FX 17.0.11.fx-zulu, and working fine.
Switched using SDKMAN, ensure it is 17.0.11.fx-zulu, note the .fx
suffix.
Add/Delete command tested, works.
Help command tested, works.
Ran JAR file using java -jar <filename>
.
Tested on Mac (Silicon) using JDK-FX 17.0.11.fx-zulu and working.
Downloaded the JAR release, ran the jar file using java -jar MacSilicon-KennethSeet.jar Performed smoke test to check functionality.
Tested on Linux (Ubuntu 22.04) using OpenJDK 17.0.11. Working.
Steps taken:
java -jar MacSilicon-KennethSeet.jar
Tested on MacSilicon (Sonoma 14.5) using JDK 17.0.11.fx-zulu and working.
Steps taken:
java -jar MacSilicon-KennethSeet.jar
Tested on Windows 11 and working.
Steps I followed:
java -jar MacSilicon-KennethSeet.jar
.Closing, as the migration was done in https://github.com/nus-oss/AB3-J17/commit/fe805d8553bbc329644371a6e732a8317ea6686f
Description
This pull request includes updates to the documentation and the
gradle.yml
file to reflect the migration of the project to Java 17. Additionally, various JDK distributions were tested for compatibility with our codebase.Environment Setup
Issues Encountered
Running AB3 on ARM64 Systems:
As an M1 Mac user, I encountered compatibility issues with certain Java versions. Non-supported SDKs would lead to a
java.lang.UnsatisfiedLinkError
indicating an 'incompatible architecture'—my machine uses ARM64, but the application required X86-64.To resolve this, it's necessary to install an ARM64 compatible SDK with JavaFX bundled. However, constantly switching between different SDKs for various needs can be cumbersome.
During CS2103 in AY23/24 Semester 2, I discovered SDKMAN!, a UNIX command-line tool that facilitates switching between Java SDK versions. This tool proved essential as I needed Java 17 for teaching CS2030 and Java 11 for CS2103.
For my system, only the JDK versions
17.0.11.fx-zulu
and17.0.11.fx-librca
were compatible.Suggestion for Future Iterations
Considering the growing popularity of ARM64 machines, documenting the use of SDKMAN! for managing and switching Java SDKs could be beneficial for future courses.