問題描述
由于最近 Oracle Java SE 支持路線圖 政策更新(特別是在 2019 年 3 月之后來自 Oracle 的免費(fèi)版本更新結(jié)束),我一直在尋找 Oracle Java 的替代品.我發(fā)現(xiàn) OpenJDK 是一種開源替代方案.我發(fā)現(xiàn) AdoptOpenJDK, 現(xiàn)在稱為 Adoptium,它是一個(gè)預(yù)構(gòu)建的二進(jìn)制文件.它令人困惑.
OpenJDK和Adoptium/AdoptOpenJDK有什么區(qū)別?
總之:
- OpenJDK有多種含義,可以參考:
- Java 平臺(tái)標(biāo)準(zhǔn)版 (Java SE) 的免費(fèi)開源實(shí)現(xiàn)
- 開源存儲(chǔ)庫 — Java 源代碼,即 OpenJDK 項(xiàng)目
- 由 Oracle 維護(hù)的預(yù)構(gòu)建 OpenJDK 二進(jìn)制文件
- 由 OpenJDK 社區(qū)維護(hù)的預(yù)構(gòu)建 OpenJDK 二進(jìn)制文件
- AdoptOpenJDK — 由社區(qū)維護(hù)的預(yù)構(gòu)建 OpenJDK 二進(jìn)制文件(開源許可)
解釋:
Prebuilt OpenJDK(或分發(fā)版)- 二進(jìn)制文件,從 http://hg 構(gòu)建.openjdk.java.net/,作為存檔或安裝程序提供,適用于各種平臺(tái),可能有支持合同.
OpenJDK,源代碼庫(也稱為 OpenJDK 項(xiàng)目) - 是一個(gè) Mercurial 基于開源存儲(chǔ)庫,托管在http://hg.openjdk.java.net.Java 源代碼.絕大多數(shù) Java 功能(從 VM 和核心庫到編譯器)僅基于此源存儲(chǔ)庫.Oracle 有一個(gè)替代分支.
OpenJDK,分發(fā)版(請(qǐng)參閱下面的提供者列表)- 免費(fèi)就像在啤酒中 和那種 像在演講中一樣自由,但是,你沒有得到如果您遇到問題,請(qǐng)致電 Oracle.沒有支持合同.此外,如果 OpenJDK(發(fā)行版)版本是最新的 Java 版本,包括 LTS(長期支持)版本,Oracle 只會(huì)發(fā)布該版本的更新.Oracle 發(fā)布 OpenJDK(發(fā)行版)12.0 版的當(dāng)天,即使 OpenJDK(發(fā)行版)11.0 版存在安全問題,Oracle 也不會(huì)發(fā)布 11.0 的更新.由 Oracle 單獨(dú)維護(hù).
一些 OpenJDK 項(xiàng)目 - 例如 OpenJDK 8 和 OpenJDK 11 - 由 OpenJDK 社區(qū)維護(hù),并為某些平臺(tái)的某些 OpenJDK 版本提供發(fā)布.社區(qū)成員負(fù)責(zé)為這些 OpenJDK 版本中的安全漏洞發(fā)布修復(fù)程序.
AdoptOpenJDK,發(fā)行版與 Oracle 的 OpenJDK 發(fā)行版非常相似(因?yàn)樗敲赓M(fèi)的,并且是通過編譯來自 OpenJDK 源代碼庫的源代碼生成的構(gòu)建).AdoptOpenJDK 作為一個(gè)實(shí)體不會(huì)向后移植補(bǔ)丁,即不會(huì)有與上游有本質(zhì)不同的 AdoptOpenJDK 'fork/version'(除了一些構(gòu)建腳本補(bǔ)丁,如 Win32 支持).這意味著,如果社區(qū)成員(Oracle 或其他人,但不是 AdoptOpenJDK 作為一個(gè)實(shí)體)將安全修復(fù)程序向后移植到 OpenJDK LTS 版本的更新,那么 AdoptOpenJDK 將為這些版本提供構(gòu)建.由 OpenJDK 社區(qū)維護(hù).
OracleJDK - 又一個(gè)發(fā)行版.從 JDK12 開始,將不再有 OracleJDK 的免費(fèi)版本.Oracle 的 JDK 分發(fā)產(chǎn)品旨在提供商業(yè)支持.您為此付費(fèi),但隨后您將依賴 Oracle 提供支持.與 Oracle 的 OpenJDK 產(chǎn)品不同,OracleJDK 為 LTS 版本提供了更長的支持.作為開發(fā)人員,您可以獲得僅用于個(gè)人/開發(fā)使用此特定 JDK 的免費(fèi)許可證,但這主要是一個(gè)紅鯡魚,因?yàn)橹皇嵌M(jìn)制文件"與 OpenJDK 二進(jìn)制文件基本相同.我猜這意味著你可以從 Oracle 的網(wǎng)站下載 LTS JDK 的安全補(bǔ)丁版本,只要你保證不將它們用于商業(yè)用途.
注意.最好將 Oracle 的 OpenJDK 構(gòu)建稱為Oracle OpenJDK 構(gòu)建".
Donald Smith,Oracle 的 Java 產(chǎn)品經(jīng)理 寫:
<塊引用>理想情況下,我們會(huì)簡單地將所有 Oracle JDK 構(gòu)建稱為Oracle JDK",根據(jù) GPL 或商業(yè)許可,取決于您的情況.然而,由于歷史原因,雖然剩下的小存在差異,我們將它們分別稱為 Oracle 的OpenJDK 構(gòu)建和 Oracle JDK.
<小時(shí)>
OpenJDK 提供程序和比較
- 采用OpenJDK - https://adoptopenjdk.net
- 亞馬遜 – Corretto - https://aws.amazon.com/corretto一個(gè)>
- 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
源代碼免費(fèi)構(gòu)建 - 分發(fā)源代碼是公開可用的,可以組裝自己的構(gòu)建
免費(fèi)二進(jìn)制分發(fā)版 - 分發(fā)版二進(jìn)制文件可公開下載和使用
擴(kuò)展更新 - 又名 LTS(長期支持) - 超過 6 個(gè)月發(fā)布生命周期的公共更新
商業(yè)支持 - 一些提供商為付費(fèi)客戶提供擴(kuò)展更新和客戶支持,例如Oracle JDK(支持詳情)
Permissive License - 分發(fā)許可證是非保護(hù)性的,例如阿帕奇 2.0
<小時(shí)>我應(yīng)該使用哪個(gè) Java 發(fā)行版?
在 Sun/Oracle 時(shí)代,通常是 Sun/Oracle 生產(chǎn)基于 OpenJDK 源的專有下游 JDK 發(fā)行版.最近,Oracle 決定僅在附帶商業(yè)支持的情況下進(jìn)行自己的專有構(gòu)建.他們還慷慨地在其 https://jdk.java.net/ 站點(diǎn)上發(fā)布了 OpenJDK 構(gòu)建.p>
從 JDK 11 開始發(fā)生的事情是從單一供應(yīng)商 (Oracle) 思維模式轉(zhuǎn)變?yōu)樵谀阆矚g的條件下選擇提供產(chǎn)品分發(fā)的供應(yīng)商的思維模式:他們構(gòu)建的平臺(tái)、頻率和發(fā)布的及時(shí)性、支持的結(jié)構(gòu)等.如果您不信任任何現(xiàn)有供應(yīng)商,您甚至可以自己構(gòu)建 OpenJDK.
OpenJDK 的每個(gè)構(gòu)建通常都來自相同的原始上游源代碼庫(OpenJDK項(xiàng)目").然而,每個(gè)構(gòu)建都非常獨(dú)特 - 免費(fèi)或商業(yè)、品牌或非品牌、純或捆綁(例如,BellSoft Liberica JDK 提供捆綁的 JavaFX,從 JDK 11 開始的 Oracle 構(gòu)建中刪除了它).
如果沒有環(huán)境(例如,Linux)和/或許可證要求定義特定的分發(fā),并且如果您想要最標(biāo)準(zhǔn) JDK 構(gòu)建,那么最好的選擇可能是使用 Oracle 的 OpenJDK 或 AdoptOpenJDK.
<小時(shí)>其他信息
是時(shí)候超越 Oracle 的 JDK 了斯蒂芬·科爾伯恩(Stephen Colebourne)
Java 仍然免費(fèi),由 Java Champions 社區(qū)(發(fā)布于2018 年 9 月 17 日)
Java 仍然是免費(fèi)的 2.0.0 由 Java Champions 社區(qū)提供(2019 年 3 月 3 日發(fā)布)
Aleksey Shipilev 關(guān)于 JDK 更新 Opsian 采訪(發(fā)布于 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)
這篇關(guān)于OpenJDK 和 Adoptium/AdoptOpenJDK 的區(qū)別的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!