OpenJDK 和 Adoptium/AdoptOpenJDK 的区别
由于最近 Oracle Java SE 支持路线图 政策更新(特别是在 2019 年 3 月之后来自 Oracle 的免费版本更新结束),我一直在寻找 Oracle Java 的替代品.我发现 OpenJDK 是一种开源替代方案.我发现 AdoptOpenJDK, 现在称为 Adoptium,它是一个预构建的二进制文件.它令人困惑.
OpenJDK和Adoptium/AdoptOpenJDK有什么区别?
解决方案总之:
- OpenJDK有多种含义,可以参考:
- Java 平台标准版 (Java SE) 的免费开源实现
- 开源存储库 — Java 源代码,即 OpenJDK 项目
- 由 Oracle 维护的预构建 OpenJDK 二进制文件
- 由 OpenJDK 社区维护的预构建 OpenJDK 二进制文件
- AdoptOpenJDK — 由社区维护的预构建 OpenJDK 二进制文件(开源许可)
解释:
Prebuilt OpenJDK(或分发版)- 二进制文件,从 http://hg 构建.openjdk.java.net/,作为存档或安装程序提供,适用于各种平台,可能有支持合同.
OpenJDK,源代码库(也称为 OpenJDK 项目) - 是一个 Mercurial 基于开源存储库,托管在http://hg.openjdk.java.net.Java 源代码.绝大多数 Java 功能(从 VM 和核心库到编译器)仅基于此源存储库.Oracle 有一个替代分支.
OpenJDK,分发版(请参阅下面的提供者列表)- 免费就像在啤酒中 和那种 像在演讲中一样自由,但是,你没有得到如果您遇到问题,请致电 Oracle.没有支持合同.此外,如果 OpenJDK(发行版)版本是最新的 Java 版本,包括 LTS(长期支持)版本,Oracle 只会发布该版本的更新.Oracle 发布 OpenJDK(发行版)12.0 版的当天,即使 OpenJDK(发行版)11.0 版存在安全问题,Oracle 也不会发布 11.0 的更新.由 Oracle 单独维护.
一些 OpenJDK 项目 - 例如 OpenJDK 8 和 OpenJDK 11 - 由 OpenJDK 社区维护,并为某些平台的某些 OpenJDK 版本提供发布.社区成员负责为这些 OpenJDK 版本中的安全漏洞发布修复程序.
AdoptOpenJDK,发行版与 Oracle 的 OpenJDK 发行版非常相似(因为它是免费的,并且是通过编译来自 OpenJDK 源代码库的源代码生成的构建).AdoptOpenJDK 作为一个实体不会向后移植补丁,即不会有与上游有本质不同的 AdoptOpenJDK 'fork/version'(除了一些构建脚本补丁,如 Win32 支持).这意味着,如果社区成员(Oracle 或其他人,但不是 AdoptOpenJDK 作为一个实体)将安全修复程序向后移植到 OpenJDK LTS 版本的更新,那么 AdoptOpenJDK 将为这些版本提供构建.由 OpenJDK 社区维护.
OracleJDK - 又一个发行版.从 JDK12 开始,将不再有 OracleJDK 的免费版本.Oracle 的 JDK 分发产品旨在提供商业支持.您为此付费,但随后您将依赖 Oracle 提供支持.与 Oracle 的 OpenJDK 产品不同,OracleJDK 为 LTS 版本提供了更长的支持.作为开发人员,您可以获得仅用于个人/开发使用此特定 JDK 的免费许可证,但这主要是一个红鲱鱼,因为只是二进制文件"与 OpenJDK 二进制文件基本相同.我猜这意味着你可以从 Oracle 的网站下载 LTS JDK 的安全补丁版本,只要你保证不将它们用于商业用途.
注意.最好将 Oracle 的 OpenJDK 构建称为Oracle OpenJDK 构建".
Donald Smith,Oracle 的 Java 产品经理 写:
<块引用>理想情况下,我们会简单地将所有 Oracle JDK 构建称为Oracle JDK",根据 GPL 或商业许可,取决于您的情况.然而,由于历史原因,虽然剩下的小存在差异,我们将它们分别称为 Oracle 的OpenJDK 构建和 Oracle JDK.
<小时>
OpenJDK 提供程序和比较
- 采用OpenJDK - https://adoptopenjdk.net
- 亚马逊 – Corretto - https://aws.amazon.com/corretto一个>
- Azul Zulu - https://www.azul.com/downloads/zulu/
- BellSoft Liberica - https://bell-sw.com/java.html
- IBM - https://www.ibm.com/developerworks/java/jdk
- jClarity - https://www.jclarity.com/adoptopenjdk-支持/
- OpenJDK 上游 - https://adoptopenjdk.net/upstream.html
- Oracle JDK - https://www.oracle.com/technetwork/java/javase/downloads
- Oracle OpenJDK - http://jdk.java.net
- ojdkbuild - https://github.com/ojdkbuild/ojdkbuild
- RedHat - https://developers.redhat.com/products/openjdk/概述
- SapMachine - https://sap.github.io/SapMachine
源代码免费构建 - 分发源代码是公开可用的,可以组装自己的构建
免费二进制分发版 - 分发版二进制文件可公开下载和使用
扩展更新 - 又名 LTS(长期支持) - 超过 6 个月发布生命周期的公共更新
商业支持 - 一些提供商为付费客户提供扩展更新和客户支持,例如Oracle JDK(支持详情)
Permissive License - 分发许可证是非保护性的,例如阿帕奇 2.0
<小时>我应该使用哪个 Java 发行版?
在 Sun/Oracle 时代,通常是 Sun/Oracle 生产基于 OpenJDK 源的专有下游 JDK 发行版.最近,Oracle 决定仅在附带商业支持的情况下进行自己的专有构建.他们还慷慨地在其 https://jdk.java.net/ 站点上发布了 OpenJDK 构建.p>
从 JDK 11 开始发生的事情是从单一供应商 (Oracle) 思维模式转变为在你喜欢的条件下选择提供产品分发的供应商的思维模式:他们构建的平台、频率和发布的及时性、支持的结构等.如果您不信任任何现有供应商,您甚至可以自己构建 OpenJDK.
OpenJDK 的每个构建通常都来自相同的原始上游源代码库(OpenJDK项目").然而,每个构建都非常独特 - 免费或商业、品牌或非品牌、纯或捆绑(例如,BellSoft Liberica JDK 提供捆绑的 JavaFX,从 JDK 11 开始的 Oracle 构建中删除了它).
如果没有环境(例如,Linux)和/或许可证要求定义特定的分发,并且如果您想要最标准 JDK 构建,那么最好的选择可能是使用 Oracle 的 OpenJDK 或 AdoptOpenJDK.
<小时>其他信息
是时候超越 Oracle 的 JDK 了斯蒂芬·科尔伯恩(Stephen Colebourne)
Java 仍然免费,由 Java Champions 社区(发布于2018 年 9 月 17 日)
Java 仍然是免费的 2.0.0 由 Java Champions 社区提供(2019 年 3 月 3 日发布)
Aleksey Shipilev 关于 JDK 更新 Opsian 采访(发布于 2019 年 6 月 27 日)
Due to recent Oracle Java SE Support Roadmap policy update (end of $free release updates from Oracle after March 2019 in particular), I've been searching for alternatives to Oracle Java. I've found that OpenJDK is an open-source alternative. And I've found AdoptOpenJDK, now known as Adoptium, which is a prebuilt binary. It puzzles.
What is the difference between OpenJDK and Adoptium/AdoptOpenJDK?
解决方案In short:
- OpenJDK has multiple meanings and can refer to:
- free and open source implementation of the Java Platform, Standard Edition (Java SE)
- open source repository — the Java source code aka OpenJDK project
- prebuilt OpenJDK binaries maintained by Oracle
- prebuilt OpenJDK binaries maintained by the OpenJDK community
- AdoptOpenJDK — prebuilt OpenJDK binaries maintained by community (open source licensed)
Explanation:
Prebuilt OpenJDK (or distribution) — binaries, built from http://hg.openjdk.java.net/, provided as an archive or installer, offered for various platforms, with a possible support contract.
OpenJDK, the source repository (also called OpenJDK project) - is a Mercurial-based open source repository, hosted at http://hg.openjdk.java.net. The Java source code. The vast majority of Java features (from the VM and the core libraries to the compiler) are based solely on this source repository. Oracle have an alternate fork of this.
OpenJDK, the distribution (see the list of providers below) - is free as in beer and kind of free as in speech, but, you do not get to call Oracle if you have problems with it. There is no support contract. Furthermore, Oracle will only release updates to any OpenJDK (the distribution) version if that release is the most recent Java release, including LTS (long-term support) releases. The day Oracle releases OpenJDK (the distribution) version 12.0, even if there's a security issue with OpenJDK (the distribution) version 11.0, Oracle will not release an update for 11.0. Maintained solely by Oracle.
Some OpenJDK projects - such as OpenJDK 8 and OpenJDK 11 - are maintained by the OpenJDK community and provide releases for some OpenJDK versions for some platforms. The community members have taken responsibility for releasing fixes for security vulnerabilities in these OpenJDK versions.
AdoptOpenJDK, the distribution is very similar to Oracle's OpenJDK distribution (in that it is free, and it is a build produced by compiling the sources from the OpenJDK source repository). AdoptOpenJDK as an entity will not be backporting patches, i.e. there won't be an AdoptOpenJDK 'fork/version' that is materially different from upstream (except for some build script patches for things like Win32 support). Meaning, if members of the community (Oracle or others, but not AdoptOpenJDK as an entity) backport security fixes to updates of OpenJDK LTS versions, then AdoptOpenJDK will provide builds for those. Maintained by OpenJDK community.
OracleJDK - is yet another distribution. Starting with JDK12 there will be no free version of OracleJDK. Oracle's JDK distribution offering is intended for commercial support. You pay for this, but then you get to rely on Oracle for support. Unlike Oracle's OpenJDK offering, OracleJDK comes with longer support for LTS versions. As a developer you can get a free license for personal/development use only of this particular JDK, but that's mostly a red herring, as 'just the binary' is basically the same as the OpenJDK binary. I guess it means you can download security-patched versions of LTS JDKs from Oracle's websites as long as you promise not to use them commercially.
Note. It may be best to call the OpenJDK builds by Oracle the "Oracle OpenJDK builds".
Donald Smith, Java product manager at Oracle writes:
Ideally, we would simply refer to all Oracle JDK builds as the "Oracle JDK", either under the GPL or the commercial license, depending on your situation. However, for historical reasons, while the small remaining differences exist, we will refer to them separately as Oracle’s OpenJDK builds and the Oracle JDK.
OpenJDK Providers and Comparison
- AdoptOpenJDK - https://adoptopenjdk.net
- Amazon – Corretto - https://aws.amazon.com/corretto
- Azul Zulu - https://www.azul.com/downloads/zulu/
- BellSoft Liberica - https://bell-sw.com/java.html
- IBM - https://www.ibm.com/developerworks/java/jdk
- jClarity - https://www.jclarity.com/adoptopenjdk-support/
- OpenJDK Upstream - https://adoptopenjdk.net/upstream.html
- Oracle JDK - https://www.oracle.com/technetwork/java/javase/downloads
- Oracle OpenJDK - http://jdk.java.net
- ojdkbuild - https://github.com/ojdkbuild/ojdkbuild
- RedHat - https://developers.redhat.com/products/openjdk/overview
- SapMachine - https://sap.github.io/SapMachine
---------------------------------------------------------------------------------------- | Provider | Free Builds | Free Binary | Extended | Commercial | Permissive | | | from Source | Distributions | Updates | Support | License | |--------------------------------------------------------------------------------------| | AdoptOpenJDK | Yes | Yes | Yes | No | Yes | | Amazon – Corretto | Yes | Yes | Yes | No | Yes | | Azul Zulu | No | Yes | Yes | Yes | Yes | | BellSoft Liberica | No | Yes | Yes | Yes | Yes | | IBM | No | No | Yes | Yes | Yes | | jClarity | No | No | Yes | Yes | Yes | | OpenJDK | Yes | Yes | Yes | No | Yes | | Oracle JDK | No | Yes | No** | Yes | No | | Oracle OpenJDK | Yes | Yes | No | No | Yes | | ojdkbuild | Yes | Yes | No | No | Yes | | RedHat | Yes | Yes | Yes | Yes | Yes | | SapMachine | Yes | Yes | Yes | Yes | Yes | ----------------------------------------------------------------------------------------
Free Builds from Source - the distribution source code is publicly available and one can assemble its own build
Free Binary Distributions - the distribution binaries are publicly available for download and usage
Extended Updates - aka LTS (long-term support) - Public Updates beyond the 6-month release lifecycle
Commercial Support - some providers offer extended updates and customer support to paying customers, e.g. Oracle JDK (support details)
Permissive License - the distribution license is non-protective, e.g. Apache 2.0
Which Java Distribution Should I Use?
In the Sun/Oracle days, it was usually Sun/Oracle producing the proprietary downstream JDK distributions based on OpenJDK sources. Recently, Oracle had decided to do their own proprietary builds only with the commercial support attached. They graciously publish the OpenJDK builds as well on their https://jdk.java.net/ site.
What is happening starting JDK 11 is the shift from single-vendor (Oracle) mindset to the mindset where you select a provider that gives you a distribution for the product, under the conditions you like: platforms they build for, frequency and promptness of releases, how support is structured, etc. If you don't trust any of existing vendors, you can even build OpenJDK yourself.
Each build of OpenJDK is usually made from the same original upstream source repository (OpenJDK "the project"). However each build is quite unique - $free or commercial, branded or unbranded, pure or bundled (e.g., BellSoft Liberica JDK offers bundled JavaFX, which was removed from Oracle builds starting JDK 11).
If no environment (e.g., Linux) and/or license requirement defines specific distribution and if you want the most standard JDK build, then probably the best option is to use OpenJDK by Oracle or AdoptOpenJDK.
Additional information
Time to look beyond Oracle's JDK by Stephen Colebourne
Java Is Still Free by Java Champions community (published on September 17, 2018)
Java is Still Free 2.0.0 by Java Champions community (published on March 3, 2019)
Aleksey Shipilev about JDK updates interview by Opsian (published on June 27, 2019)
相关文章