🍺 BREW Explorer

← all formulae

openjdk@21

brew install openjdk@21 v21.0.11 GPL-2.0-only WITH Classpath-exception-2.0 keg-only

Java 21 development kit (JDK) with compiler, runtime, and standard library.

Why you might care

Use this if you need Java 21 specifically alongside other Java versions, or if you want a free, open-source JDK without proprietary licensing. It's keg-only, so multiple Java versions can coexist. Includes javac compiler, java runtime, and build tools like jar and jshell.

Categories

Alternatives

openjdk adoptopenjdk temurin graalvm oraclejdk
27.0k
30-day installs · #197
86.5k
90-day · #200
282.3k
365-day · #226

Runtime dependencies

Build dependencies

Links

Caveats

For the system Java wrappers to find this JDK, symlink it with
  sudo ln -sfn $HOMEBREW_PREFIX/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk

Keg-only reason

:versioned_formula

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "openjdk",
    "adoptopenjdk",
    "temurin",
    "graalvm",
    "oraclejdk"
  ],
  "build_dependencies": [
    "autoconf",
    "pkgconf"
  ],
  "categories": [
    "language-runtime",
    "compiler"
  ],
  "caveats": "For the system Java wrappers to find this JDK, symlink it with\n  sudo ln -sfn $HOMEBREW_PREFIX/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk\n",
  "conflicts_with": [],
  "dependencies": [
    "freetype",
    "giflib",
    "harfbuzz",
    "jpeg-turbo",
    "libpng",
    "little-cms2"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Development kit for the Java programming language",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:40:44+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "openjdk@21",
  "github_default_branch": null,
  "github_last_commit_at": null,
  "github_readme_excerpt": null,
  "github_repo": null,
  "github_stars": null,
  "github_topics": [],
  "homepage": "https://openjdk.org/",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": "OpenJDK",
  "installs_30d": 27019,
  "installs_365d": 282343,
  "installs_90d": 86492,
  "keg_only": 1,
  "keg_only_reason": ":versioned_formula",
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "GPL-2.0-only WITH Classpath-exception-2.0",
  "llm_generated_at": "2026-06-20T23:43:20+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "openjdk@21",
  "oldnames": [],
  "one_liner": "Java 21 development kit (JDK) with compiler, runtime, and standard library.",
  "optional_dependencies": [],
  "rank_30d": 197,
  "rank_365d": 226,
  "rank_90d": 200,
  "raw_hash": "767dbf1cfcfc92d7",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/o/openjdk@21.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [
    "cups",
    "unzip",
    "zip"
  ],
  "version_head": null,
  "version_stable": "21.0.11",
  "versioned_formulae": [
    "openjdk@25",
    "openjdk@17",
    "openjdk@11",
    "openjdk@8"
  ],
  "why_use_this": "Use this if you need Java 21 specifically alongside other Java versions, or if you want a free, open-source JDK without proprietary licensing. It\u0027s keg-only, so multiple Java versions can coexist. Includes javac compiler, java runtime, and build tools like jar and jshell."
}