Java OpenJDK 和 AdaptOpenJDK 的区别
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52431764/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Difference between OpenJDK and AdoptOpenJDK
提问by Mikhail Kholodkov
Due to recent Oracle Java SE Support Roadmappolicy 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, which is a prebuilt binary. It puzzles.
由于最近的Oracle Java SE 支持路线图政策更新(特别是 2019 年 3 月之后 Oracle 的免费版本更新结束),我一直在寻找 Oracle Java 的替代品。我发现 OpenJDK 是一种开源替代方案。我找到了 AdoptOpenJDK,它是一个预构建的二进制文件。它令人困惑。
What is the difference between OpenJDK and AdoptOpenJDK?
OpenJDK 和 AdaptOpenJDK 有什么区别?
采纳答案by Mikhail Kholodkov
In short:
简而言之:
- OpenJDKhas multiple meanings and can be referred as:
- 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)
- OpenJDK有多重含义,可以简称为:
- Java 平台标准版 (Java SE) 的免费开源实现
- 开源存储库——Java 源代码又名 OpenJDK 项目
- 由 Oracle 维护的预构建 OpenJDK 二进制文件
- 由 OpenJDK 社区维护的预构建 OpenJDK 二进制文件
- 采用OpenJDK — 由社区维护的预构建 OpenJDK 二进制文件(开源许可)
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(或发行版)——二进制文件,从http://hg.openjdk.java.net/构建,作为存档或安装程序提供,为各种平台提供,可能有支持合同。
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,源存储库(也称为OpenJDK 项目) - 是一个基于Mercurial的开源存储库,托管在 http://hg.openjdk.java.net。Java 源代码。绝大多数 Java 功能(从 VM 和核心库到编译器)都完全基于此源存储库。Oracle 有一个替代分支。
OpenJDK, the distribution(see the list of providers below) - is free as in beerand 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 shall not release an update for 11.0. Maintained solely by Oracle.
OpenJDK,发行版(请参阅下面的提供商列表)-像啤酒一样免费,并且像语音一样免费,但是,如果您遇到问题,则无法致电 Oracle。没有支持合同。此外,如果该版本是最新的 Java 版本,包括 LTS(长期支持)版本,Oracle 只会发布对任何 OpenJDK(发行版)版本的更新。oracle 发布 OpenJDK(发行版)12.0 版的那一天,即使 OpenJDK(发行版)11.0 版存在安全问题,Oracle 也不会发布 11.0 版的更新。仅由 Oracle 维护。
Some OpenJDK project - such as OpenJDK 8and 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.
某些 OpenJDK 项目(例如OpenJDK 8和OpenJDK 11)由 OpenJDK 社区维护,并为某些平台的某些 OpenJDK 版本提供版本。社区成员负责发布这些 OpenJDK 版本中安全漏洞的修复程序。
AdoptOpenJDK, the distribution- 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.
采用 OpenJDK,发行版- 与 Oracle 的 OpenJDK 发行版非常相似(因为它是免费的,并且它是通过编译来自 OpenJDK 源代码库的源代码生成的构建版本)。作为一个实体,AdoptOpenJDK 不会向后移植补丁,即不会有与上游有实质性不同的 AdoptOpenJDK 'fork/version'(除了一些构建脚本补丁,比如 Win32 支持)。这意味着,如果社区成员(Oracle 或其他人,但不是 AdoptOpenJDK 作为实体)向后移植安全修复程序以更新 OpenJDK LTS 版本,则 AdoptOpenJDK 将为这些人提供构建。由 OpenJDK 社区维护。
There's also OracleJDK- another distribution, starting with JDK12 there will be no free version of this. Oracle's JDK distribution offering intended for commercial support. You pay for this, but then you do get to rely on Oracle for support. Unlike Oracle's OpenJDK offering, the OracleJDK offering does come 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.
还有OracleJDK- 另一个发行版,从 JDK12 开始将没有免费版本。Oracle 的 JDK 发行版旨在提供商业支持。您为此付费,但随后您确实可以依赖 Oracle 的支持。与 Oracle 的 OpenJDK 产品不同,OracleJDK 产品确实对 LTS 版本提供了更长的支持。作为开发人员,您可以获得仅用于此特定 JDK 的个人/开发使用的免费许可证,但这主要是一种红鲱鱼,因为“只是二进制文件”基本上与 OpenJDK 二进制文件相同。我想这意味着你可以从 Oracle 的网站下载 LTS JDK 的安全补丁版本,只要你保证不会将它们用于商业用途。
Note. It maybe best to call the OpenJDK builds by Oracle, the "Oracle OpenJDK builds".
注意。最好将 Oracle 的 OpenJDK 构建称为“Oracle OpenJDK 构建”。
Donald Smith, Java product manager at Oracle writes:
Oracle 的 Java 产品经理 Donald Smith写道:
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.
理想情况下,我们会将所有 Oracle JDK 构建简单地称为“Oracle JDK”,根据您的情况,无论是在 GPL 下还是在商业许可下。但是,由于历史原因,虽然存在一些小的差异,但我们将它们分别称为 Oracle 的 OpenJDK 构建和 Oracle JDK。
OpenJDK Providers and Comparison
OpenJDK 提供程序和比较
- 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
- 采用OpenJDK- https://adoptopenjdk.net
- 亚马逊 - Corretto- https://aws.amazon.com/corretto
- 祖鲁语- 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 上游- https://adoptopenjdk.net/upstream.html
- Oracle JDK- https://www.oracle.com/technetwork/java/javase/downloads
- 甲骨文 OpenJDK- http://jdk.java.net
- ojdkbuild- https://github.com/ojdkbuild/ojdkbuild
- 红帽- 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
扩展更新- 又名 LTS(长期支持) - 超过 6 个月发布生命周期的公开更新
Commercial Support- some providers offer extended updates and customer support to paying customers, e.g. Oracle JDK (support details)
商业支持- 一些提供商为付费客户提供扩展更新和客户支持,例如 Oracle JDK(支持详细信息)
Permissive License- the distribution license is non-protective, e.g. Apache 2.0
Permissive License- 分发许可证是非保护性的,例如 Apache 2.0
Which Java Distribution Should I Use?
我应该使用哪个 Java 发行版?
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.
在 Sun/Oracle 时代,通常是 Sun/Oracle 生产基于 OpenJDK 源的专有下游 JDK 发行版。最近,Oracle 决定仅在附带商业支持的情况下进行自己的专有构建。他们也在他们的https://jdk.java.net/站点上慷慨地发布了 OpenJDK 版本。
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/promptness of releases, how support is structured, etc. If you don't trust any of existing vendors, you can even build OpenJDK yourself.
从 JDK 11 开始发生的事情是从单一供应商 (Oracle) 思维方式转变为在您喜欢的条件下选择为您提供产品发行版的提供商的思维方式:他们构建的平台、发布的频率/及时性,如何构建支持等。如果您不信任任何现有供应商,您甚至可以自己构建 OpenJDK。
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).
OpenJDK 的每个构建版本通常都来自相同的原始上游源代码库(OpenJDK“项目”)。然而,每个构建都是非常独特的——免费或商业、品牌或无品牌、纯或捆绑(例如,BellSoft Liberica JDK 提供捆绑的 JavaFX,从 JDK 11 开始从 Oracle 构建中删除)。
If no environment (e.g., Linux) and/or license requirement defines specific distribution and if you want the most standardJDK build, then probably the best option is to use OpenJDK by Oracle or AdoptOpenJDK.
如果没有环境(例如,Linux)和/或许可证要求定义特定的发行版,并且如果您想要最标准的JDK 构建,那么最好的选择可能是使用 Oracle 的 OpenJDK 或 AdoptOpenJDK。
Additional information
附加信息
Time to look beyond Oracle's JDKby Stephen Colebourne
是时候超越 Oracle 的 JDK 了,作者 Stephen Colebourne
Java Is Still Freeby Java Champions community (published on September 17, 2018)
JavaChampions 社区的Java Is Still Free(2018 年 9 月 17 日发布)
Java is Still Free 2.0.0by Java Champions community (published on March 3, 2019)
JavaChampions 社区发布的Java is Still Free 2.0.0(2019 年 3 月 3 日发布)
Aleksey Shipilev about JDK updatesinterview by Opsian (published on June 27, 2019)
Aleksey Shipilev接受Opsian 对 JDK 更新的采访(2019 年 6 月 27 日发布)
回答by Basil Bourque
OpenJDK? source code
AdoptOpenJDK? builds
开放式JDK? 源代码 采用
OpenJDK? 建造
Difference between OpenJDK and AdoptOpenJDK
OpenJDK 和 AdaptOpenJDK 的区别
The first provides source-code, the other provides buildsof that source-code.
第一个提供源代码,另一个提供该源代码的构建。
- OpenJDKis an open-sourceproject providing source-code (not builds) of an implementation of the Java platformas defined by:
- the Java Specifications
- Java Specification Request (JSR) documents published by Oracle via the Java Community Process
- JDK Enhancement Proposal (JEP)documents published by Oracle
- AdoptOpenJDKis an organization founded by some prominent members of the Java community aimed at providing binary builds and installers at no cost for users of Java technology.
- OpenJDK是一个开源项目,提供Java 平台实现的源代码(不是构建),定义如下:
- 在Java规范
- Oracle 通过Java Community Process发布的 Java 规范请求 (JSR) 文档
- Oracle 发布的JDK Enhancement Proposal (JEP)文档
- AdoptOpenJDK是一个由 Java 社区的一些著名成员创立的组织,旨在为 Java 技术用户免费提供二进制构建和安装程序。
Several vendors of Java & OpenJDK
多家 Java 和 OpenJDK 供应商
AdoptOpenJDKis only one of several vendors distributing implementations of the Java platform. These include:
采用 OpenJDK只是分发 Java 平台实现的几个供应商之一。这些包括:
- AdoptOpenJDK
- Azul Systems
- Oracle
- Red Hat / IBM
- BellSoft
- SAP
- Amazon AWS
- … and more
- 采用OpenJDK
- 蔚蓝系统
- 甲骨文
- 红帽/IBM
- 贝尔软件
- 树液
- 亚马逊AWS
- … 和更多
See this flowchart of mine to help guide you in picking a vendor for an implementation of the Java platform. Click/tap to zoom.
请参阅我的这个流程图,以帮助指导您为 Java 平台的实现选择供应商。单击/点击可缩放。
Another resource: This comparison matrixby Azul Systems is useful, and seems true and fair to my mind.
另一个资源:Azul Systems 的这个比较矩阵很有用,在我看来似乎是真实和公平的。
Here is a list of considerations and motivations to consider in choosing a vendor and implementation.
以下是选择供应商和实施时要考虑的考虑因素和动机列表。
Some vendors offer you a choice of JITtechnologies.
一些供应商为您提供JIT技术的选择。
To understand more about this Java ecosystem, read Java Is Still Free
要了解有关此 Java 生态系统的更多信息,请阅读Java Is Still Free