Skip to content

OpenJDK

The reference Java implementation — compiler, runtime and tooling.

Homebrew formula Direct download

What it does

OpenJDK provides javac, java, jshell, jar, and the diagnostic tools (jcmd, jstack, jmap) used to inspect a running JVM. It is the upstream all commercial JDK builds derive from.

Where it fits

Mostly as a dependency: Maven needs a JDK, and several self-hosted homelab services — anything Kafka, Elasticsearch, Minecraft or Jenkins-adjacent — ship as JVM applications.

Notes

Homebrew installs OpenJDK keg-only, so it is not linked into PATH automatically. To let macOS’s /usr/libexec/java_home find it:

sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk \
  /Library/Java/JavaVirtualMachines/openjdk.jdk

Alternative to

AlternativeTypeTrade-off
Eclipse TemurinOpen sourceThe most widely used prebuilt OpenJDK, from Adoptium
Amazon Corretto and Azul ZuluFreeLong-term-supported builds with vendor backing
GraalVMOpen sourceAdds native-image ahead-of-time compilation
Oracle JDKFreeThe same code, different licence terms

Install

brew install openjdk

Links

This post is licensed under CC BY 4.0 by the author.
Last updated on