How To Install Java on Your New Java-less macOS

OK, it’s 2021 and you got new Macs. Or maybe you just finished upgrading your macOS to Catalina or Big Sur and found there is no Java anymore. This article might help you with that.

As widely known, Oracle announced that the Oracle JDK 8 builds released after JAN 2019 will not be free for commercial use. Since OS X 10.7 Java is not (pre-)installed anymore. Well, I’m not a fan of Java myself (i stop using it after Java 1.6 i guess). But since I’m also tinkering with Android (and Kafka), I have no choice but put Java in my dev machines.

Instead using Oracle’s, I will use OpenJDK.

There are several ways to install OpenJDK to your Mac.

  1. Simply install the prebuilt OpenJDK binary.
  2. Install via homebrew
  3. Compile the source codes your self :P
Continue reading “How To Install Java on Your New Java-less macOS”