简体   繁体   English

Oracle JDK不是开源项目吗?

[英]Is Oracle JDK not an open source project?

I read at Technically what is the main difference between Oracle JDK and Open JDK? 我从技术上阅读了Oracle JDK和Open JDK之间的主要区别是什么? the

"Oracle JDK is an implementation of the OpenJDK and is not open source" “ Oracle JDK是OpenJDK的实现,不是开源的”

But JDK source code is openly available and free . 但是JDK源代码是公开可用和免费的。 Right . 对 。 So how come its not open source ? 那么它为什么不开源呢? May be i am wrong here in judging the oracle JDK as open source because source code may be available and free but is it not allowed to modify/extend and redistribute it further, that why it is not open source ? 在这里将oracle JDK判定为开放源代码可能是错误的,因为源代码可能是免费的,但是否不允许进一步修改/扩展和重新分发它,为什么它不是开放源代码?

But [the Oracle] JDK source code is openly available and free. 但是[Oracle] JDK源代码是公开可用和免费的。 Right? 对?

Strictly speaking, No. 严格来说,不是

1) The full source code for the Oracle JDK is not available. 1)Oracle JDK的完整源代码不可用。 The JDK source code ZIP file only contains the source code for the public class library APIs. JDK源代码ZIP文件仅包含公共类库API的源代码。 Not some of the "internal" class. 不是某些“内部”类。 Not the JDK / JRE toolchains. 不是JDK / JRE工具链。 Not the JVM runtime itself; 不是JVM运行时本身。 eg the JIT compiler, GC implementations, the verifier, etc. 例如JIT编译器,GC实现,验证器等。

2) For the subset that is available you need to accept an Oracle license. 2)对于可用的子集,您需要接受Oracle许可证。

3) The source code that is available says in the copyright headers that it is Oracle (or Sun) proprietary. 3)可用的源代码在版权标头中指出它是Oracle(或Sun)专有的。

So how come its not open source? 那么为什么它不是开源的呢?

See above. 往上看。

May be i am wrong here because source code may be available and free but is it not allowed to modify/extend and redistribute it further, that why it is not open source ? 可能是我错了,因为源代码可能可用且免费,但不允许对其进行进一步的修改/扩展和重新分发,这就是为什么它不是开放源代码的原因?

That is one reason. 这是原因之一。

Open source doesn't just mean that source code is available for free. 开源不仅意味着免费提供源代码。 It it also available without undue restrictions on what you can do with it. 它也可以不受任何限制地使用。

(And if you want the full source code for Oracle JDK, then it is not available for free, and the terms and conditions are pretty restrictive.) (并且,如果您需要Oracle JDK的完整源代码,那么它不是免费提供的,并且条款和条件有严格的限制。)


By contrast the OpenJDK codebase is covered by GPLv2 (with the "Classpath exception" which clarifies the point that an application built to use the OpenJDK JVM / class libraries is not subject to the GPL.) Everything that is part of OpenJDK is available as source code ... without you signing anything. 相比之下,GPLv2涵盖了OpenJDK代码库(带有“类路径异常”,这一点阐明了为使用OpenJDK JVM /类库而构建的应用程序不受GPL的限制。)包含在OpenJDK中的所有内容都可以作为源代码使用。代码...无需签署任何内容。

Sure the GPL places restrictions on what you can do, but those are designed to make the code free (as in liberty) and protect the rights of the end-user. 当然,GPL对您的工作有限制,但这些限制是为了使代码自由(如自由)并保护最终用户的权利。

OpenJDK is open source under the GPL v2 license, whereas OracleJDK uses Oracle Binary Code License Agreement (more on that here and here ). OpenJDK是GPL v2许可下的开放源代码,而OracleJDK使用Oracle二进制代码许可协议( 此处此处的更多内容)。

You're not wrong when you say that the source code is freely available but it's not allowed to be modified and redistributed further. 当您说源代码是免费提供的,但不允许您对其进行进一步的修改和重新分配时,您没有错。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM