Now that Apple Silicon computers are publicly available, and there is the first native JDK for this CPU architecture from Azul https://www.azul.com/downloads/zulu-community/?package=jdk, it would awesome that I could install it using SDKMAN.
@imrabti I totally agree, it will be fantastic to have this platform covered. Some work needs to be done on the CLI to accommodate this. We use the output of uname and uname -m to infer the architecture of a platform on SDKMAN. If you perhaps have such a machine available, please help us by providing the output of those two commands.
@marc0der I have a MBP with M1 I tried the two commands and here is the output :
For uname I get Darwin
And for uname -m I get arm64
Does anyone know what a normal Mac reports for uname -m? I'm guessing that uname also returns Darwin. Apologies, I'm a Linux user :smile:
Hi @marc0der ,
On normal(Intel) mac, uname returns Darwin and uname -m returns x86_64 .
Hi all!
Is there an update on this?
Should be doable by adding a similar check for DarwinARM64 here: https://github.com/sdkman/sdkman-cli/blob/b8b856f4a589e2447dae8c7ce7fe234a982a5d26/src/main/bash/sdkman-init.sh#L34
However, with Rosetta 2, the x86_64 JDKs will run just fine. From a design point of view, if DarwinARM64 is added, should it be possible to also list/install x86_64 candidates?
The available candidates would be,
Or maybe just ask the user to set SDKMAN_PLATFORM="Darwin" specifically to install x86_64 JDKs?
If it helps, this is the output from macOS Arm64 Zulu JDK by Azul:
System.out.println(System.getProperty("os.name") + " " + System.getProperty("os.arch"));
Mac OS X aarch64
Most helpful comment
@marc0der I have a MBP with M1 I tried the two commands and here is the output :
For
unameI getDarwinAnd for
uname -mI getarm64