

Near the top you’ll see build number and download links for various operating systems. In this article I will show you how to install JDK 19 on MacOS and to setup IntelliJ IDEA so you can write Java applications against it. Even though it isn’t a LTS release, it’s worth installing it so we can test new features. The tooling for building early-access builds at the OpenJDK site may also be open-sourced but I don’t know for certain.Java 19 is currently the latest version of Java. If you are curious about, or have an academic interest in compiling Java from the OpenJDK codebase, I suggest examining the open-sourced tooling at Adoptium (formerly AdoptOpenJDK). Compiling JavaĪs commented, your specific error is likely due to you compiling for 32-bit ARM rather than 64-bit ARM architecture used by Apple for their M1 chip and M2 chip families.

I myself have been using Java 17, 18, and 19, as well as early-access 20, on a couple of M1 MacBook Pro laptops with IntelliJ and Maven on Big Sur & Monterey. So I would suggest Java 17 for deployment. Java 17 is the latest LTS version, to be supported for many years. Vendors such as Azul Systems provide Apple Silicon builds for the current version 19 as well as the long-term support (LTS) versions 8, 11, and 17. These builds/installers will be based largely or entirely on the OpenJDK codebase. You have your choice of builds/installers from any of several vendors such as SAP, Red Hat/IBM, BellSoft, Azul Systems, Oracle, Adoptium/AdoptOpenJDK, Microsoft, Amazon, Pivotal, and more. OpenJDK officially supports macOS on Apple Silicon: JEP 391: macOS/AArch64 Port. If your goal is to be productive in Java programming, then compiling the Java JDK toolset is not the best use of your time. Instead, we look to any of several vendors providing builds and installers. Detailsįew of us ever compile the very large and complicated codebase of OpenJDK. I see downloads available now from that company for Java 11.0.13+8 on both Intel Macs and Apple Silicon Macs.

For example, Azul Systems announced 2020-11 plans to ship builds of OpenJDK 8 and 11 for Apple Silicon, ARM-based Macs. Or, use a build of earlier versions of Java ported to Apple Silicon by various vendors.

And no need, as others provide binaries & installers.įor a Mac using Apple Silicon rather than Intel x86-64, I suggest obtaining a distribution of Java 17 for macOS / AArch64, released 2021-09, from any of several vendors. Do not compile for 32-bit.ĭo not try to compile OpenJDK. Target (64) differs … number of bits … in the target (32)Īpple Silicon chips for macOS (M1, M2) are all 64-bit architectures.
