Issue
I am using a MacBook Air with the M1 chip.
I tried Zulu JDK for M1 for development, and it works, however it does not work with OpenJFX. I have narrowed down the problem using Zulu vs AdoptOpenJDK.
Does anyone have any idea when OpenJDK will be compatible with the M1 chip?
Solution
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.
Answered By - Basil Bourque
Answer Checked By - Willingham (JavaFixing Volunteer)