Oracle JDK和OpenJDK之间的差异。

[英]Differences between Oracle JDK and OpenJDK

Are there any crucial differences between Oracle and OpenJDK?


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


Does GC work differently between the two?


4 个解决方案



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.


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.


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


Ref: List of Java virtual machines

Ref: Java虚拟机列表



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


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中还没有可用),并使用开放源代码替代方案替换受限制的第三方组件,以实现代码库之间更紧密的对等。



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



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.


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





Oracle JDK vs. OpenJDK


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


  • 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开发过程



  © 2014-2022 联系我们: