# openjdk@21 を Homebrew, apt, apk, MacPorts, Nix, chocolatey, winget でインストール

openjdk@21 のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:openjdk@21
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install openjdk@21
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install openjdk21
```

  証拠: MacPorts ports tree: java/openjdk21/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install openjdk-21-dbg
```

  証拠: Debian stable package indexes: openjdk-21-dbg from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- apk (92%):

```sh
sudo apk add openjdk21
```

  証拠: Alpine Linux edge package indexes: openjdk21 from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#openjdk21
```

  証拠: nixpkgs package indexes: openjdk21 from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

### Windows

- Chocolatey (92%):

```sh
choco install openjdk
```

  証拠: Chocolatey community package catalog: openjdk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','openconnect-gui'

- winget (92%):

```sh
winget install --id Microsoft.OpenJDK.17 -e
```

  証拠: Windows Package Manager source index: Microsoft.OpenJDK.17 from https://cdn.winget.microsoft.com/cache/source.msix

## パッケージ情報

- **パッケージキー:** brew:openjdk@21
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/openjdk@21>
- **バージョン:** 21.0.12
- **ソース概要:** Development kit for the Java programming language
- **ホームページ:** <https://openjdk.org/>
- **リポジトリ:** <https://github.com/openjdk/jdk21u>
- **上流ドキュメント:** <https://openjdk.org/>
- **ライセンス:** GPL-2.0-only WITH Classpath-exception-2.0
- **ソースアーカイブ:** <https://github.com/openjdk/jdk21u/archive/refs/tags/jdk-21.0.12-ga.tar.gz>
- **最終更新:** 2026-07-22T10:29:57Z
- **生成日時:** 2026-08-04T22:13:35+00:00

## 依存関係

- freetype
- giflib
- harfbuzz
- jpeg-turbo
- libpng
- little-cms2

## ビルド依存関係

- autoconf
- pkgconf

## インストール挙動

- post-install フック: 未定義
- 注意点: 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
- Bottle: 利用可能 対象 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 21.0.12
- マネージャ更新日: 2026-07-22
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/openjdk/jdk21u
- 情報: No cached GitHub release or tag data was available.
## プロジェクトの歴史と使われ方

OpenJDK 21 is the open-source reference implementation of Java SE 21. It reached General Availability on 19 September 2023 and became the next major long-term-support Java line after JDK 17, with virtual threads as its headline operational feature.

### プロジェクトの歴史

JDK 21 was produced by the OpenJDK JDK Project under the same time-based release model used for earlier post-Java-9 releases. The release implements Java SE 21 as specified by JSR 396 and was tracked through the JEP process.

The feature set shows how the Java platform evolved after JDK 17: virtual threads were finalized, record patterns and pattern matching for switch were delivered, sequenced collections joined the core libraries, Generational ZGC arrived, and several Panama, Amber, Vector, and structured-concurrency features remained preview or incubator work.

### 採用の歴史

The OpenJDK release page identifies JDK 21 as a long-term-support release from most vendors. That made it the natural upgrade candidate for teams already on Java 17 that wanted the newer concurrency model, pattern-matching improvements, and garbage-collector work without tracking every six-month feature release.

Virtual threads drove much of the ecosystem attention around JDK 21. The JEP describes them as lightweight threads intended to preserve the simple thread-per-request programming style while improving the scalability of high-throughput server applications, which made the release especially relevant to web frameworks, application servers, observability tools, and JVM operators.

### 使われ方

The package supplies the complete Java 21 developer kit: compiler, runtime, packaging tools, serviceability tools, jshell, jlink, jpackage, jwebserver, signing tools, and diagnostics. Developers install it to build and run Java 21 applications, test virtual-thread workloads, target Java 21 bytecode, and keep CI environments aligned with a named LTS release.

Operators and build engineers care about openjdk@21 because it offers a pinned Java 21 toolchain independent of the unversioned latest JDK. That is useful for reproducible Maven/Gradle builds, container base images, local development shells, and production systems that certify against a particular Java release family.

### パッケージ好きにとっての重要性

OpenJDK 21 is where a package entry is more than 'the Java package': it is a versioned runtime contract. The package lets downstream formulas, buildpacks, language servers, and CI runners ask for Java 21 specifically while other software remains on Java 17 or moves to newer feature releases.

For package nerds, the interesting bit is the coexistence problem: a modern workstation or build farm may need JDK 8 for legacy code, JDK 17 for one LTS fleet, and JDK 21 for virtual-thread-capable services. Versioned OpenJDK packages make that matrix explicit.

### タイムライン

- 19 September 2023: JDK 21 reached General Availability as the Java SE 21 reference implementation.
- JDK 19 and JDK 20: virtual threads were delivered as preview features before finalization in JDK 21.
- JDK 21 release train: record patterns, pattern matching for switch, virtual threads, sequenced collections, and Generational ZGC landed in one LTS-labeled release.

### Related projects

- JDK 21 follows the JDK 17 LTS line and precedes later feature releases such as JDK 22 through JDK 25. It is also tied to OpenJDK projects such as Loom for virtual threads, Amber for language features, Panama for foreign-memory and vector work, and ZGC work in HotSpot.

### ソース

- <https://docs.oracle.com/en/java/javase/21/>
- <https://github.com/openjdk/jdk21u>
- <https://openjdk.org/jeps/444>
- <https://openjdk.org/projects/jdk/>
- <https://openjdk.org/projects/jdk/21/>


## セキュリティノート

openjdk@21 に一致するローカルシークレット処理マニフェストは見つかりませんでした。将来の対応で安定したパッケージ URL を使えるよう、パッケージメタデータはここに公開されています。


## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** openjdk@21
- **Version Scheme:** 0
- **Revision:** 0
- **Requirements:** xcode
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** yes
- **URL Keys:** stable

## 他のパッケージマネージャ記録

- Debian apt - openjdk-21-dbg - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-dbg from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Java runtime based on OpenJDK (debugging symbols) | https://openjdk.java.net/
- Debian apt - openjdk-21-demo - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-demo from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Java runtime based on OpenJDK (demos and examples) | https://openjdk.java.net/
- Debian apt - openjdk-21-doc - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenJDK Development Kit (JDK) documentation | https://openjdk.java.net/
- Debian apt - openjdk-21-jdk - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-jdk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenJDK Development Kit (JDK) | https://openjdk.java.net/
- Debian apt - openjdk-21-jdk-headless - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-jdk-headless from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenJDK Development Kit (JDK) (headless) | https://openjdk.java.net/
- Debian apt - openjdk-21-jre - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-jre from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenJDK Java runtime, using Hotspot JIT | https://openjdk.java.net/
- Debian apt - openjdk-21-jre-headless - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-jre-headless from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenJDK Java runtime, using Hotspot JIT (headless) | https://openjdk.java.net/
- Debian apt - openjdk-21-jre-zero - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-jre-zero from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Alternative JVM for OpenJDK, using Zero | https://openjdk.java.net/
- Debian apt - openjdk-21-source - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-source from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | OpenJDK Development Kit (JDK) source files | https://openjdk.java.net/
- Debian apt - openjdk-21-testsupport - 21.0.11+10-1~deb13u2: normalized package name match | Debian stable package indexes: openjdk-21-testsupport from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Java runtime based on OpenJDK (regression test support) | https://openjdk.java.net/
- Ubuntu apt - openjdk-21-dbg - 21.0.3+9-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: openjdk-21-dbg from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Java runtime based on OpenJDK (debugging symbols) | https://openjdk.java.net/
- Ubuntu apt - openjdk-21-demo - 21.0.3+9-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: openjdk-21-demo from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Java runtime based on OpenJDK (demos and examples) | https://openjdk.java.net/
- Ubuntu apt - openjdk-21-doc - 21.0.3+9-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: openjdk-21-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | OpenJDK Development Kit (JDK) documentation | https://openjdk.java.net/
- Ubuntu apt - openjdk-21-jdk - 21.0.3+9-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: openjdk-21-jdk from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | OpenJDK Development Kit (JDK) | https://openjdk.java.net/
- Ubuntu apt - openjdk-21-jdk-headless - 21.0.3+9-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: openjdk-21-jdk-headless from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | OpenJDK Development Kit (JDK) (headless) | https://openjdk.java.net/
- Ubuntu apt - openjdk-21-jre - 21.0.3+9-1ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: openjdk-21-jre from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | OpenJDK Java runtime, using Hotspot JIT | https://openjdk.java.net/


## 関連リンク

- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://pkg.so/ja/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/ja/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/ja/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [harfbuzz](https://pkg.so/ja/brew/harfbuzz/) - Runtime dependency declared by Homebrew.
- [libpng](https://pkg.so/ja/brew/libpng/) - Runtime dependency declared by Homebrew.
- [jpeg-turbo](https://pkg.so/ja/brew/jpeg-turbo/) - Runtime dependency declared by Homebrew.
- [freetype](https://pkg.so/ja/brew/freetype/) - Runtime dependency declared by Homebrew.
- [little-cms2](https://pkg.so/ja/brew/little-cms2/) - Runtime dependency declared by Homebrew.
- [giflib](https://pkg.so/ja/brew/giflib/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/ja/brew/pkgconf/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/ja/brew/autoconf/) - Build dependency declared by Homebrew.
- [ghidra](https://pkg.so/ja/brew/ghidra/) - Popular package that depends on this formula.
- [bazel](https://pkg.so/ja/brew/bazel/) - Popular package that depends on this formula.
- [jenkins-lts](https://pkg.so/ja/brew/jenkins-lts/) - Popular package that depends on this formula.
- [jmeter](https://pkg.so/ja/brew/jmeter/) - Popular package that depends on this formula.
- [apache-spark](https://pkg.so/ja/brew/apache-spark/) - Popular package that depends on this formula.
- [neo4j](https://pkg.so/ja/brew/neo4j/) - Popular package that depends on this formula.
- [jenkins](https://pkg.so/ja/brew/jenkins/) - Popular package that depends on this formula.
- [openjdk](https://pkg.so/ja/brew/openjdk/) - Package name indicates the same formula family.
- [openjdk@17](https://pkg.so/ja/brew/openjdk-17/) - Package name indicates the same formula family.
- [openjdk@11](https://pkg.so/ja/brew/openjdk-11/) - Package name indicates the same formula family.
- [openjdk@8](https://pkg.so/ja/brew/openjdk-8/) - Package name indicates the same formula family.
- [openjdk@25](https://pkg.so/ja/brew/openjdk-25/) - Package name indicates the same formula family.

## Combined YAML source

View the package source record on GitHub. [combined/openjdk@21.yml](https://github.com/mxcl/pkgdb/blob/main/combined/openjdk@21.yml)


## ソース

- pkg.so package database
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
