从技术上讲,Oracle JDK和OpenJDK的主要区别是什么?(复制)

时间:2022-07-17 07:01:49

This question already has an answer here:

这个问题已经有了答案:

I have been using OpenJDK for ages, initially for small projects where it has no problems. But since I started to play with it for big toys, I started to notice random/unknown fatal error and crashes (with H.264 codecs, etc.), and it was a nightmare till then to get ride of system crash+fatal errors caused by OpenJDK.

我使用OpenJDK已经有很长一段时间了,最初是用于没有问题的小型项目。但是自从我开始玩大玩具的时候,我就开始注意到随机/未知的致命错误和崩溃(H.264编解码器,等等),到那时为止,得到系统崩溃+ OpenJDK造成的致命错误的骑乘是一场噩梦。

After getting completely frustrated and tired with OpenJDK, I finally decided to switch into Oracle JDK 7. Since then my fatal errors/crashes were gone. I am still doing trace to see if it occurs, but I never got those system crashes yet.

在对OpenJDK彻底失望和厌倦之后,我最终决定改用Oracle JDK 7。从那时起,我的致命错误/崩溃就消失了。我仍在跟踪以查看是否发生了这种情况,但我还没有遇到系统崩溃的情况。

Now I am wondering, if OpenJDK is only a license issue, why is stability impossible with it?

现在我想知道,如果OpenJDK仅仅是一个许可证问题,那么为什么它不可能实现稳定呢?

Why does OpenJDK keep bugs alive, inside their stable releases, but claiming that its clone of Oracle JDK (which it is not really), then what really technically separates OpenJDK from Oracle JDK? (only quick features availability? Or focused on stability/reliability?)

为什么OpenJDK在稳定的版本中保持bug的存在,但是声称它对Oracle JDK的克隆(实际上不是),那么什么技术上把OpenJDK和Oracle JDK区别开来呢?(只有快速功能可用性?或关注稳定/可靠性吗?)

2 个解决方案

#1


69  

Technical differences are a consequence of the goal of each one (OpenJDK is meant to be the reference implementation, open to the community, while Oracle is meant to be a commercial one)

技术差异是每个目标的结果(OpenJDK的目的是作为参考实现,对社区开放,而Oracle的目的是作为商业实现)

They both have "almost" the same code of the classes in the Java API; but the code for the virtual machine itself is actually different, and when it comes to libraries, OpenJDK tends to use open libraries while Oracle tends to use closed ones; for instance, the font library.

它们在Java API中拥有“几乎”相同的类代码;但是虚拟机本身的代码实际上是不同的,当涉及到库时,OpenJDK倾向于使用开放库,而Oracle倾向于使用封闭库;例如,字体库。

#2


61  

OpenJDK is a reference model and open source, while Oracle JDK is an implementation of the OpenJDK and is not open source. Oracle JDK is more stable than OpenJDK.

OpenJDK是一个参考模型和开放源码,而Oracle JDK是OpenJDK的实现,不是开放源码。Oracle JDK比OpenJDK更稳定。

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

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

OpenJDK and Oracle JDK have almost the same code, but Oracle JDK has more classes and some bugs fixed.

OpenJDK和Oracle JDK有几乎相同的代码,但是Oracle JDK有更多的类,并且修复了一些错误。

So if you want to develop enterprise/commercial software I would suggest to go for Oracle JDK, as it is thoroughly tested and stable.

因此,如果您想开发企业/商业软件,我建议您去Oracle JDK,因为它是经过彻底测试和稳定的。

I have faced lot of problems with application crashes using OpenJDK, which are fixed just by switching to Oracle JDK

我曾遇到过许多使用OpenJDK的应用程序崩溃的问题,这些问题仅仅通过切换到Oracle JDK就得到了解决

#1


69  

Technical differences are a consequence of the goal of each one (OpenJDK is meant to be the reference implementation, open to the community, while Oracle is meant to be a commercial one)

技术差异是每个目标的结果(OpenJDK的目的是作为参考实现,对社区开放,而Oracle的目的是作为商业实现)

They both have "almost" the same code of the classes in the Java API; but the code for the virtual machine itself is actually different, and when it comes to libraries, OpenJDK tends to use open libraries while Oracle tends to use closed ones; for instance, the font library.

它们在Java API中拥有“几乎”相同的类代码;但是虚拟机本身的代码实际上是不同的,当涉及到库时,OpenJDK倾向于使用开放库,而Oracle倾向于使用封闭库;例如,字体库。

#2


61  

OpenJDK is a reference model and open source, while Oracle JDK is an implementation of the OpenJDK and is not open source. Oracle JDK is more stable than OpenJDK.

OpenJDK是一个参考模型和开放源码,而Oracle JDK是OpenJDK的实现,不是开放源码。Oracle JDK比OpenJDK更稳定。

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

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

OpenJDK and Oracle JDK have almost the same code, but Oracle JDK has more classes and some bugs fixed.

OpenJDK和Oracle JDK有几乎相同的代码,但是Oracle JDK有更多的类,并且修复了一些错误。

So if you want to develop enterprise/commercial software I would suggest to go for Oracle JDK, as it is thoroughly tested and stable.

因此,如果您想开发企业/商业软件,我建议您去Oracle JDK,因为它是经过彻底测试和稳定的。

I have faced lot of problems with application crashes using OpenJDK, which are fixed just by switching to Oracle JDK

我曾遇到过许多使用OpenJDK的应用程序崩溃的问题,这些问题仅仅通过切换到Oracle JDK就得到了解决