Java for mac Development

Java for Apple M1, nightmare on ARM street

23/08/21 3 min. read

Recently I have been looking forward to acquiring a new Apple laptop with and M1 CPU as I’ve already heard that as soon as macOS Monterey there will be some features not available to Intel based macs.

The checklist

So I started with the typical developer checklist:

  • Docker: OK (if it is relevant for you this is the install guide: https://docs.docker.com/docker-for-mac/apple-silicon/, rosetta is required )
  • Node.js: OK (guide to install Node.js on Apple M1)
  • Git: OK
  • VSCode: OK
  • Virtualization: Pararells if needed, paid platform.
  • Java… java where art thou?

The search

I started look at Oracle website, not too brilliant from me, I tried to find out JDK 8 for Apple Silicon:

The only version for macOS was x64, maybe it was logical that Oracle did not update JDK 8, a product 7 years old with Premier support ending on March 2022.

So I jumped to Java 11, the next LTS (Long Term Support) version and W*F?

jdk version 11 for macOS only for x64

Still no Apple silicon support, just x64 as you can see for the extension.

I finally checked latest Java version, Java 16 and then…

jdk version 16 for macOS x64

Does this mean that I cannot run Java on an Apple with M1?

The discovery

Not really. You have alternate JDK, remember our Java series of articles? Here you can find a list of alternatives: https://santanderglobaltech.com/en/abyss-of-java-11-affects-java-8-update-212-is-its-end/  so, I checked some of them:

There it is, some options to run Java in macOS, finally. Albeit younger languages like node.js and others have more hype Java was necessary.

Hidden knowledge 💎

But I had the itch, how was it possible that Oracle, the owner of Java, didn’t have an Apple silicon macOS version?

A bit more research shows this forum thread: https://community.oracle.com/tech/apps-infra/discussion/4479447/oracle-jdk-8-on-apple-m1-macbook

So it seems that at least Oracle took care of Java 11 in M1 albeit not easy to figure out.

Also Microsoft is building a version of Java 16: https://github.com/microsoft/openjdk-aarch64/releases/tag/16-ea%2B10-macos

But… hey! ⚠️

One thing to keep in mind is that I’ve seen some videos over there that shows you how to install Java on Apple M1 but it is downloading x86 version so indeed it is running Java on top of Rosetta 2, what is not very desirable.

BTW remember that brew is your friend in terms of developing with Apple it even has a search tool to find out if your beloved tool is available.

Santander Global Tech is the global technology company, part of Santander’s Technology and Operations (T&O) division. With more than 2,000 employees and based in Madrid, we work to make Santander an open platform for financial services.

Do you want to join this great team? Check out the positions we have open here and Be Tech! with Santander 🙃

Follow us on LinkedIn and Instagram.

Juan Tavira

Juan Tavira

Santander Global Tech

Specialist, architect and interdisciplinary geek passionate about all kinds of innovations. This is easy to say for oneself, but when my computing colleagues, my geek friends and even my wife say so, then it must be true somehow ;-). I also like to build violins as a hobby. I see code

 

👉 My LinkedIn profile

 

Other posts