# Installer openjdk@21 avec Homebrew, apt, apk, MacPorts, Nix, chocolatey, winget

Consultez les chemins d'installation, exécutables, métadonnées et notes de sécurité de openjdk@21 pour les workflows d'agents IA.

## installation

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

Commandes d'installation supplémentaires:

### macOS

- Homebrew (100%):

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

  Preuve: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install openjdk21
```

  Preuve: 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
```

  Preuve: 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
```

  Preuve: 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
```

  Preuve: 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
```

  Preuve: 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
```

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

## Faits du paquet

- **Clé du paquet:** brew:openjdk@21
- **Gestionnaire de paquets:** Homebrew
- **Page du gestionnaire de paquets:** <https://formulae.brew.sh/formula/openjdk@21>
- **Version:** 21.0.12
- **Résumé source:** Development kit for the Java programming language
- **Page d'accueil:** <https://openjdk.org/>
- **Dépôt:** <https://github.com/openjdk/jdk21u>
- **Docs amont:** <https://openjdk.org/>
- **Licence:** GPL-2.0-only WITH Classpath-exception-2.0
- **Archive source:** <https://github.com/openjdk/jdk21u/archive/refs/tags/jdk-21.0.12-ga.tar.gz>
- **Dernière mise à jour:** 2026-07-22T10:29:57Z
- **Généré:** 2026-08-04T22:13:35+00:00

## Dépendances

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

## Dépendances de compilation

- autoconf
- pkgconf

## Comportement d'installation

- hook post-installation: non défini
- Précautions: 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
- Bouteille: disponible sur arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Version et fraîcheur

- page générée: 2026-08-04
- version du gestionnaire: 21.0.12
- gestionnaire mis à jour: 2026-07-22
- données locales: OK
- dépôt amont: https://github.com/openjdk/jdk21u
- info: No cached GitHub release or tag data was available.
## Historique du projet et usages

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.

### Historique du projet

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.

### Historique d'adoption

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.

### Modes d'utilisation

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.

### Pourquoi les passionnés de paquets s'y intéressent

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.

### Chronologie

- 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.

### Sources

- <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/>


## Notes de sécurité

Aucun manifest local de gestion des secrets correspondant n'a été trouvé pour openjdk@21. Les métadonnées de paquet restent publiées ici afin que la couverture future dispose d'une URL stable.


## Détails de la base source

- **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

## Autres enregistrements de gestionnaires de paquets

- 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/


## Liens liés

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


## Sources

- 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
