Java/Jdk for the Apple M1 Chip

When will AdoptOpenJDK 11 come for Apple with M1 chip?

Java 17, shipped 2021-09

There is an official sub-project on the OpenJDK project for porting to the Apple Silicon hardware, JEP 391: macOS/AArch64 Port.

That work is done, built for Java 17, delivered in September of 2021.

The Apple Silicon port benefits from work done on the Windows on ARM port. That work is done, delivered in Java 16. Previous to that, Linux on ARM support was added to Java 9.

So Java 17 for macOS on Apple Silicon (AArch64, ARM) Macs is available now.

Update: Java 18 is now available too, as is early access Java 19.

You can choose from a variety of vendors to obtain an installer/binary. Off the top of my head, those may include Azul Systems, SAP, BellSoft, Amazon, Microsoft, Adoptium (formerly AdoptOpenJDK), Oracle, Red Hat/IBM, Pivotal, and perhaps more.

Regarding JavaFX, at least two of those vendors, Azul Systems and BellSoft, offer an edition of their JDK product that bundles the OpenJFX libraries. That may be of interest to you, as an alternative to adding the libraries to your app.

If you need further assistance with that Azul product, you can purchase support from that company. Or post a Question here with the detailed specifics of your JavaFX work and its point of failure on Apple Silicon. Ideally, provide a minimal example of code demonstrating the problem.

Earlier Java

Some of those vendors listed above have back-ported earlier versions of Java (Java 8, Java 11, maybe others) to macOS on Apple Silicon. That work is not an official part of the OpenJDK project support for Apple Silicon, only Java 17+ is.

Is it possible to run JavaFX with Java 11 on M1 Mac?

I don't have an M1 Mac to test, but did you try the build of JDK 11 with JavaFX included that Azul provides? I saw that you mentioned zulu-11, just not sure if you picked the version with JavaFX bundled.

Be sure to choose “macOS”, “ARM 64-bit”, and “JDK FX” in the various pop-up menus of the download page.

https://www.azul.com/downloads/?version=java-11-lts&os=macos&architecture=arm-64-bit&package=jdk-fx

Java error:JDK 17.0.1 can’t be installed on this computer

tl;dr

Use an installer for Intel Macs rather than Apple Silicon Macs.

Obtain installer for Macs with Intel chips

Certainly Java 17 will run on your computer.

I am not sure, but I would make this guess as to the root of your problem… I suspect you downloaded an installer for the Apple Silicon Macs, rather than for Macs with Intel chips.

Go to any of the several vendors providing JDK products. Some are free-of-cost, some require a fee. Be sure to understand their terms before downloading.

Those vendors include, off the top of my head: Azul Systems, Adoptium (formerly AdoptOpenJDK), BellSoft, Amazon, Red Hat/IBM, Microsoft, Oracle, SAP, Pivotal, and likely more.

On their respective download page, be sure to opt for the edition labeled "Intel", "x86", "AMD-64", or some such to indicate Macs with Intel chips.

Do not download any edition labeled "Apple Silicon", "ARM", or "AArch-64", as these indicate the Macs with M1 chips.

Here is an example screenshot from Adoptium web site for their Temurin product, an installer of a JDK implementing Java 17 based on the source code at the OpenJDK project.

Screenshot of Adoptium download page



Related Topics



Leave a reply



Submit