Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Value of System.getProperty("os.arch") on M1 Mac?

What value does System.getProperty("os.arch") return on an AppleSilicon/M1 Mac running the aarch64 port of the JDK (for example the Liberica port), i.e. not using Rosetta2?

Based on this, I am guessing it's aarch64. Can anyone confirm this?

Thanks.

like image 696
Hendrik Avatar asked Feb 28 '21 15:02

Hendrik


People also ask

Which Java JDK should I download for Mac M1?

Installing the JDK on macOS To install the JDK on macOS: Download the JDK . dmg file, jdk-16.

Does Java JDK work on Mac M1?

The brew formula for openjdk is also installing a compatible Apple M1 JDK build. For managing different Java versions, sdkman or jEnv is an excellent option. For those lucky developers that have the chance to work and experiment with the GraalVM, the support for Apple M1 has also landed.

Does Java work on Apple silicon?

You can run Java for Intel Macs on Apple Silicon (ARM, Aarch64) via Rosetta 2. But for maximum performance, obtain an implementation of Java 8 built for Apple Silicon Macs.


Video Answer


1 Answers

It is, indeed, aarch64. At least it is from Azul Zulu Java 11.

like image 53
delfuego Avatar answered Oct 15 '22 23:10

delfuego