macOS
brew install openjdk@21local Homebrew formula metadata
sudo port install openjdk21MacPorts ports tree · java/openjdk21/Portfile · 来源: api.github.com
安装
brew install openjdk@21local Homebrew formula metadata
sudo port install openjdk21MacPorts ports tree · java/openjdk21/Portfile · 来源: api.github.com
sudo apt install openjdk-21-dbgDebian stable package indexes · openjdk-21-dbg · 来源: deb.debian.org
sudo apk add openjdk21Alpine Linux edge package indexes · openjdk21 · 来源: dl-cdn.alpinelinux.org
nix profile install nixpkgs#openjdk21nixpkgs package indexes · openjdk21 · 来源: raw.githubusercontent.com
choco install openjdkChocolatey community package catalog · openjdk · 来源: community.chocolatey.org
winget install --id Microsoft.OpenJDK.17 -eWindows Package Manager source index · Microsoft.OpenJDK.17 · 来源: cdn.winget.microsoft.com
概览
Development kit for the Java programming language
历史
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.
安全态势
没有找到 openjdk@21 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
| 没有可执行文件数据。 | |||
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/openjdk/jdk21u
安装元数据
| 软件包键 | brew:openjdk@21 |
|---|---|
| 版本 | 21.0.11 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/openjdk@21 |
| 主页 | https://openjdk.org/ |
| 仓库 | https://github.com/openjdk/jdk21u |
| 上游文档 | https://docs.oracle.com/en/java/javase/21 |
| 许可证 | GPL-2.0-only WITH Classpath-exception-2.0 |
| 源码归档 | https://github.com/openjdk/jdk21u/archive/refs/tags/jdk-21.0.11-ga.tar.gz |
| 最后更新 | 2026-06-25T13:37:59+02:00 |
| Pulse | updated |
| 依赖 | freetype, giflib, harfbuzz, jpeg-turbo, libpng, little-cms2 |
| 构建依赖 | autoconf, pkgconf |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew 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 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | openjdk@21 |
| Version Scheme | 0 |
| Revision | 0 |
| Requirements |
|
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | yes |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
openjdk-21-dbg 21.0.11+10-1~deb13u2
Java runtime based on OpenJDK (debugging symbols)
sudo apt install openjdk-21-dbgopenjdk-21-demo 21.0.11+10-1~deb13u2
Java runtime based on OpenJDK (demos and examples)
sudo apt install openjdk-21-demoopenjdk-21-doc 21.0.11+10-1~deb13u2
OpenJDK Development Kit (JDK) documentation
sudo apt install openjdk-21-docopenjdk-21-jdk 21.0.11+10-1~deb13u2
OpenJDK Development Kit (JDK)
sudo apt install openjdk-21-jdkopenjdk-21-jdk-headless 21.0.11+10-1~deb13u2
OpenJDK Development Kit (JDK) (headless)
sudo apt install openjdk-21-jdk-headlessopenjdk-21-jre 21.0.11+10-1~deb13u2
OpenJDK Java runtime, using Hotspot JIT
sudo apt install openjdk-21-jreopenjdk-21-jre-headless 21.0.11+10-1~deb13u2
OpenJDK Java runtime, using Hotspot JIT (headless)
sudo apt install openjdk-21-jre-headlessopenjdk-21-jre-zero 21.0.11+10-1~deb13u2
Alternative JVM for OpenJDK, using Zero
sudo apt install openjdk-21-jre-zeroopenjdk-21-source 21.0.11+10-1~deb13u2
OpenJDK Development Kit (JDK) source files
sudo apt install openjdk-21-sourceopenjdk-21-testsupport 21.0.11+10-1~deb13u2
Java runtime based on OpenJDK (regression test support)
sudo apt install openjdk-21-testsupportopenjdk-21-dbg 21.0.3+9-1ubuntu1
Java runtime based on OpenJDK (debugging symbols)
sudo apt install openjdk-21-dbgopenjdk-21-demo 21.0.3+9-1ubuntu1
Java runtime based on OpenJDK (demos and examples)
sudo apt install openjdk-21-demoopenjdk-21-doc 21.0.3+9-1ubuntu1
OpenJDK Development Kit (JDK) documentation
sudo apt install openjdk-21-docopenjdk-21-jdk 21.0.3+9-1ubuntu1
OpenJDK Development Kit (JDK)
sudo apt install openjdk-21-jdkopenjdk-21-jdk-headless 21.0.3+9-1ubuntu1
OpenJDK Development Kit (JDK) (headless)
sudo apt install openjdk-21-jdk-headlessopenjdk-21-jre 21.0.3+9-1ubuntu1
OpenJDK Java runtime, using Hotspot JIT
sudo apt install openjdk-21-jre来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.