问题描述
由于最近的 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二进制文件(获得开源许可)
说明:
预构建的OpenJDK (或分发)—二进制文件,从 http://hg构建.openjdk.java.net/(作为档案或安装程序提供),提供给各种平台,并带有可能的支持合同.
OpenJDK,源存储库(也称为 OpenJDK项目)-是基于Mercurial 的开放源代码存储库,托管于 http://hg.openjdk.java.net . Java源代码.绝大多数Java功能(从VM和核心库到编译器)仅基于此源存储库.甲骨文对此有另一种选择.
OpenJDK,发行版(请参阅下面的提供程序列表)-免费像啤酒一样,并且像讲话一样免费,但是,您没有得到如果遇到问题,请致电Oracle.没有支持合同.此外,如果Oracle OpenJDK是最新的Java版本,包括LTS(长期支持)版本,则Oracle只会发布该版本的更新. Oracle发布OpenJDK(发行版)12.0版的那天,即使OpenJDK(发行版)11.0版存在安全问题,Oracle也不会发布11.0版的更新.完全由Oracle维护.
一些OpenJDK项目-例如 OpenJDK 8 和 OpenJDK 11 -由OpenJDK社区维护,并提供某些平台的某些OpenJDK版本的发行版.社区成员负责发布这些OpenJDK版本中的安全漏洞修复程序.
采用OpenJDK,此发行版与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构建".
Oracle Java产品经理Donald Smith,写:
OpenJDK提供程序和比较
- AdoptOpenJDK - 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/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 | ----------------------------------------------------------------------------------------
我应该使用哪个Java发行版?
在Sun/Oracle时代,通常是Sun/Oracle基于OpenJDK源产生专有的下游JDK发行版.最近,Oracle决定仅在附带商业支持的情况下进行自己的专有构建.他们还在其 https://jdk.java.net/网站上慷慨地发布了OpenJDK构建. >
从JDK 11开始,发生的事情是从单一供应商(Oracle)思维方式转变为思维方式,在这种思维方式中,您选择了一个提供商,可以在您喜欢的条件下为您的产品分发产品:他们为之构建的平台,频率和发布的及时性,支持的结构方式等.如果您不信任任何现有供应商,甚至可以自己构建OpenJDK.
每个OpenJDK构建通常都由相同的原始上游源存储库(OpenJDK项目")制成.但是,每个构建都是非常独特的-免费或商业的,有品牌的或无品牌的,纯净的或捆绑的(例如,BellSoft Liberica JDK提供捆绑的JavaFX,而从JDK 11开始从Oracle构建中删除了捆绑的JavaFX).
如果没有环境(例如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 athttp://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:
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 | ----------------------------------------------------------------------------------------
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)
这篇关于OpenJDK和Adoptium/AdoptOpenJDK之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!