Oracle JDK和OpenJDK之间的差异。

[英]Differences between Oracle JDK and OpenJDK


Are there any crucial differences between Oracle and OpenJDK?

Oracle和OpenJDK之间有什么关键的区别吗?

For example, are the garbage collection and other JVM parameters the same?

例如,垃圾收集和其他JVM参数是否相同?

Does GC work differently between the two?

GC在这两者之间的工作方式不同吗?

4 个解决方案

#1


119  

Both OpenJDK and Oracle JDK are created and maintained currently by Oracle only.

OpenJDK和Oracle JDK都是由Oracle创建和维护的。

OpenJDK and Oracle JDK are implementations of the same Java specification passed the TCK (Java Technology Certification Kit).

OpenJDK和Oracle JDK是通过TCK (Java技术认证工具包)的相同Java规范的实现。

Most of the vendors of JDK are written on top of OpenJDK by doing a few tweaks to [mostly to replace licensed proprietary parts / replace with more high-performance items that only work on specific OS] components without breaking the TCK compatibility.

JDK的大多数供应商都是在OpenJDK的基础上编写的,通过做一些调整(主要是替换许可的专有部分/替换为只在特定OS上工作的高性能项目),而不会破坏TCK的兼容性。

Many vendors implemented the Java specification and got TCK passed. For example, IBM J9, Azul Zulu, Azul Zing, and Oracle JDK.

许多供应商实现了Java规范并通过了TCK。例如,IBM J9、Azul Zulu、Azul Zing和Oracle JDK。

Almost every existing JDK is derived from OpenJDK.

几乎所有现有的JDK都来自OpenJDK。

As suggested by many, licensing is a change between JDKs.

正如许多人所指出的,许可是jdk之间的一种变化。

Ref: List of Java virtual machines

Ref: Java虚拟机列表

#2


274  

Nothing crucial. The OpenJDK project is mostly based on HotSpot source code donated by Sun.

没有什么重要的。OpenJDK项目主要基于Sun提供的HotSpot源代码。

Moreover, OpenJDK was selected to be the reference implementation for Java 7 and is maintained by Oracle engineers.

此外,选择OpenJDK作为Java 7的参考实现,并由Oracle工程师维护。

There's a more detailed answer to your question here, which links to this blog post:

你的问题有一个更详细的答案,链接到这篇博文:

Q: What is the difference between the source code found in the OpenJDK repository, and the code you use to build the Oracle JDK?

问:在OpenJDK存储库中找到的源代码与用于构建Oracle JDK的代码之间有什么区别?

A: It is very close - our build process for Oracle JDK releases builds on OpenJDK 7 by adding just a couple of pieces, like the deployment code, which includes Oracle's implementation of the Java Plugin and Java WebStart, as well as some closed source third party components like a graphics rasterizer, some open source third party components, like Rhino, and a few bits and pieces here and there, like additional documentation or third party fonts. Moving forward, our intent is to open source all pieces of the Oracle JDK except those that we consider commercial features such as JRockit Mission Control (not yet available in Oracle JDK), and replace encumbered third party components with open source alternatives to achieve closer parity between the code bases.

它非常接近——我们的构建过程对甲骨文JDK版本基于OpenJDK 7通过添加几块,如部署代码,包括甲骨文Java插件的实现和Java WebStart,以及一些闭源的第三方组件,如图形光栅化程序一些开放源码的第三方组件,像犀牛一样,和一些零碎东西,像额外的文档或第三方字体。接下来,我们的目标是将Oracle JDK的所有部分开源,除了那些我们考虑到的商业特性,比如JRockit任务控制(在Oracle JDK中还没有可用),并使用开放源代码替代方案替换受限制的第三方组件,以实现代码库之间更紧密的对等。

#3


29  

A key difference going forward is the release schedule and support policy.

未来的一个关键区别是发布时间表和支持策略。

OpenJDK

OpenJDK will have a feature release every 6 months which is only supported until the next feature release. It's essentially a continuous stream of releases targeted to developers.

OpenJDK将每6个月发布一次特性发布,直到下一个特性发布。它本质上是面向开发人员的连续发行流。

Oracle JDK

The Oracle JDK is targeted more towards an enterprise audience which values stability. It's based on one of the OpenJDK releases but is then given long term support (LTS). The Oracle JDK has releases planned every 3 years.

Oracle JDK针对的是一个重视稳定性的企业用户。它基于OpenJDK的一个发行版,但随后会得到长期支持(LTS)。Oracle JDK计划每三年发布一次。

enter image description here

Source: https://www.oracle.com/java/java9-screencasts.html?bcid=5582439790001&playerType=single-social&size=events

来源:https://www.oracle.com/java/java9-screencasts.html?bcid=5582439790001&playerType=single-social&size=events

#4


11  

Oracle JDK vs. OpenJDK

甲骨文JDK和OpenJDK

  • OpenJDK is an open source implementation of the Java Standard Edition platform with contribution from Oracle and the open Java community.

    OpenJDK是Java标准版平台的开源实现,由Oracle和开放Java社区提供支持。

  • OpenJDK is released under license GPL v2 wherein Oracle JDK is licensed under Oracle Binary Code License Agreement.

    OpenJDK是在许可GPL v2下发布的,其中Oracle JDK是在Oracle二进制代码许可协议下授权的。

  • Actually, Oracle JDK’s build process builds from OpenJDK source code. So there is no major technical difference between Oracle JDK and OpenJDK. Apart from the base code, Oracle JDK includes, Oracle’s implementation of Java Plugin and Java WebStart. It also includes third-party closed source and open source components like graphics rasterizer and Rhino respectively. OpenJDK Font Renderer and Oracle JDK Flight Recorder are the noticeable major differences between Oracle JDK and OpenJDK.

    实际上,Oracle JDK的构建过程是从OpenJDK源代码构建的。因此,Oracle JDK和OpenJDK之间没有什么主要的技术差异。除了基本代码之外,Oracle JDK还包括,Oracle的Java插件和Java WebStart的实现。它还包括第三方的闭源和开源组件,如图形光栅和Rhino。OpenJDK字体渲染器和Oracle JDK飞行记录器是Oracle JDK和OpenJDK的显著区别。

  • Rockit was the Oracle’s JVM and from Java SE 7, HotSpot and JRockit merged into a single JVM. So now we have only the merged HotSpot JVM available.
  • Rockit是Oracle的JVM,来自Java SE 7, HotSpot和JRockit合并到一个JVM中。所以现在我们只有合并的HotSpot JVM可用。
  • There are instances where people claim that they had issues while running OpenJDK and that got solved when switched over to Oracle JDK.
  • 在某些情况下,人们声称在运行OpenJDK时遇到了问题,并在切换到Oracle JDK时解决了这个问题。
  • Twitter has its own JDK.
  • Twitter有自己的JDK。
  • Software like Android Studio, IntelliJ IDEA, and Minecraft expects Oracle JDK to be used. In fact, warns.
  • Android Studio、IntelliJ IDEA和Minecraft等软件都希望使用Oracle JDK。事实上,警告说。

Source: Oracle JDK vs OpenJDK and Java JDK Development Process

源:Oracle JDK vs OpenJDK和Java JDK开发过程


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2014/03/12/c75b777751339ca31715af5a27fe1a33.html



 
  © 2014-2022 ITdaan.com 联系我们: