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.jdkAlternative to
| Alternative | Type | Trade-off |
|---|---|---|
| Eclipse Temurin | Open source | The most widely used prebuilt OpenJDK, from Adoptium |
| Amazon Corretto and Azul Zulu | Free | Long-term-supported builds with vendor backing |
| GraalVM | Open source | Adds native-image ahead-of-time compilation |
| Oracle JDK | Free | The same code, different licence terms |
Install
brew install openjdk