Java 版本控制和术语,1.6 与 6.0 OpenJDK 与 Sun

发布于 2024-08-24 02:11:35 字数 307 浏览 4 评论 0原文

我在理解 Java 版本控制方面遇到问题。我看到了很多版本,例如 1.4.2、1.5 和 1.6,但我也偶然发现了 5.0 和 6.0。我不明白这个版本控制或进展。

我对 Java 还很陌生,我读过一些关于 OpenJDK 与 Sun 的内容,并且我想我明白了。这些版本是 OpenJDK 和 Sun 之间的区别吗?比如OpenJDK最新的是1.6,Sun的是6.0?

对于刚接触 Java 的人来说,所有这些版本都非常令人困惑。

I'm having problems understanding Java versioning. I'm seeing lots of versions like 1.4.2, 1.5 and 1.6, but I also stumble upon 5.0 and 6.0. I don't understand this versioning or the progression.

I'm pretty new to Java, and I've read a bit about OpenJDK vs Sun, and I think I understand it. Are these versions the difference between OpenJDK and Sun? For example, OpenJDK's latest is 1.6 and Sun's is 6.0?

All these versions are pretty confusing to someone new to Java.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

黄昏下泛黄的笔记 2024-08-31 02:11:36

1.6 和 6 均用于引用相同的版本(1.5 和 5 也类似)。

Both 1.6 and 6 are used to refer to the same version (and similarly for 1.5 and 5).

知你几分 2024-08-31 02:11:36

Java 版本指南 是任何人的最佳博客新人了解 Java 版本控制

自 2019 年以来,Java 每 6 个月(即 3 月和 9 月)发布新版本。

现在是 2021 年 10 月,Java 17 已经发布。这是下载OpenJDK

几个值得注意的点

  1. 你可以始终使用最新版本的java,它将执行使用以前版本编写的代码
  2. 以前JRE和JDK是分开分发的,现在有一种趋势只分发JDK
  3. 有两个发行版:OpenJDK(免费)和OracleJDK(有薪酬的)

Guide to java versions is the best blog for any new person to understand java versioning

Since 2019, Java releases new version every 6 months, i.e. March and September.

It's October 2021, and Java 17 is already released. Here is the link to download OpenJDK

Couple of noteworthy points

  1. you can use always use the latest version of java, it will execute the code written using previous versions
  2. previously JRE and JDK were separately distributed, now there is a trend to only distribute JDK
  3. There are two distributions: OpenJDK (free) and OracleJDK (paid)
沉默的熊 2024-08-31 02:11:36

唯一的区别是单位数字通常与 Java SE 5 和Java EE 6.

1.5 和 1.6 版本是 Java 编译器使用 java -version,有时“次要版本”用作版本字符串,例如 SunOS 5.8 被称为 Solaris 8 作为产品名称。

The only difference is the single digit numbers are usually used in conjunction with Java SE 5 and Java EE 6.

The 1.5 and 1.6 versions are what the Java compiler says using java -version and sometimes 'the minor release' is used as a version string, like SunOS 5.8 was called Solaris 8 as a product name.

雨夜星沙 2024-08-31 02:11:35

版本控制简直是一团糟:

  • Java 1.0 和 1.1 是正常的
  • 然后是 Java 1.2,但你应该称其为“Java 2,JDK 1.2”
  • 这种情况一直持续到 1.4(也有像 1.4.2 这样的小版本)
  • 下一个版本当时据说是“Java 5.0”,但文件名和 URL 中仍然到处都是“1.5”。
  • 从 Java 6 开始,他们放弃了次要版本,并且大部分(但不完全,请参阅 java -version 的输出)消除了旧版本控制方案的痕迹,但人们已经习惯了它并且继续通俗地使用它。
  • 从 Java 9 开始,1.X 表示法也从 java -version 的输出中消失(这导致一些依赖于解析它的代码被破坏)。请参阅JEP 223:新版本字符串方案
  • Java 10 修订了 Java SE 平台和 JDK 的版本字符串方案以及相关版本控制信息,以适应当前和未来基于时间的发布模型。请参阅JEP 322

我们现在有 Java 15、Java 16、Java 17 等。请参阅 Java 版本历史记录 在维基百科中。

另请注意,当提出这个问题时,Sun JDK 和 OpenJDK 是独立的代码库(有很大重叠),并且 Sun JDK 是官方参考实现。

此后的十多年里,Java 被出售给 Oracle,OpenJDK 成为官方 Java 参考实现,Oracle 停止将 Oracle JDK 作为单独的代码库进行维护。相反,他们只是提供 OpenJDK 版本,并通过错误修复和安全补丁为其提供商业长期支持。但是您也可以从 AdoptOpenJDK(最近更名为 "Adoptium")免费获取构建版本,但它们并不是支持多久。

The versioning is simply a mess:

  • Java 1.0 and 1.1 were normal
  • Then came Java 1.2, but you were supposed to call it "Java 2, JDK 1.2"
  • This continued until 1.4 (There were also minor releases like 1.4.2)
  • The next version was then supposedly "Java 5.0", but there was still "1.5" all over the place in the file names and URLs.
  • Starting with Java 6, they've dropped the minor version and mostly (but not completely, see output of java -version) eliminated the traces of the old versioning scheme, but people have gotten used to it and continue to use it colloquially.
  • Starting with Java 9, the 1.X notation also disappeared from the output of java -version (which caused some code that depended on parsing it to break). See JEP 223: New Version-String Scheme.
  • Java 10 revised the version-string scheme of the Java SE Platform and the JDK, and related versioning information, for present and future time-based release models. See JEP 322.

We now have Java 15, Java 16, Java 17, etc. See Java Version History in Wikipedia.

Note also that when this question was asked, Sun JDK and OpenJDK were separate codebases (whith a large overlap), and Sun JDK was the official reference implementation.

In the more than 10 years since then, Java was sold to Oracle, OpenJDK became the official Java reference implementation, and Oracle stopped maintaining the Oracle JDK as a separate codebase. Instead, they just provide OpenJDK builds and provide commercial long term support for them with bugfixes and security patches. But you can also get builds for free from AdoptOpenJDK (which recently rebranded as "Adoptium"), they just aren't supported as long.

烏雲後面有陽光 2024-08-31 02:11:35

Java SE 命名和版本对此进行了解释(咳):

当前版本是Java平台,
标准版 6 (Java SE 6)。这
之前的版本是 Java 2 Platform,
标准版 5.0 (J2SE 5.0)。

Sun Microsystems 简化了
2006年平台名称更佳
反映成熟程度,
稳定性、可扩展性和安全性
内置于 Java 平台中。太阳
去掉名字中的“2”
删除了“点号”(数字
期间之后)。任何更新
Java 平台将简单地标记为
更新而不是添加“点”
平台末尾的“编号”
名称。

由于在国内非常受欢迎
Java 开发者社区
开发套件已恢复为
“Java 2 SDK”中的名称“JDK”(或
“J2SDK”)。运行时环境有
从“J2RE”恢复为“JRE”。
(请注意,“JDK”代表“J2SE
5.0 版本中的“开发套件”。)

有关平台名称的更多信息
和版本号,请参见以下内容
页面:

并引用 Java SE 6 平台名称和版本号

在此版本中,平台名称已从 J2SETM 更改为 JavaTM SE。正式名称是 JavaTM Platform, Standard Edition 6。

两个版本号(1.6.0 和 6)用于标识 Java 平台的此版本。版本 6 是产品版本,而 1.6.0 是开发人员版本。数字 6 用于反映 Java SE 的成熟度、稳定性、可扩展性和安全性的不断发展水平。

还有 J2SE 版本 1.5.0 或 5.0? :

版本号“1.5.0”和“5.0”用于标识此版本的 Java 2 平台标准版。版本“5.0”是产品版本,而“1.5.0”是开发者版本。 “5.0”这个数字是为了更好地体现J2SE的成熟度、稳定性、可扩展性和安全性水平。

数字“5.0”是通过删除前导“1”得到的。从“1.5.0”开始。您可能期望看到 1.5.0,现在是 5.0(原来是 1.5,现在是 5)。

所以,总而言之,整个命名是一团糟,但这最终是 ,当前的平台名称是 JavaTM Platform, Standard Edition 6(缩写为 JavaTM SE 6)。该平台下提供了两个产品:JDKTM 6 和 JRETM 6

。 java.net/projects/jdk6/" rel="noreferrer">OpenJDK 6 是 Java SE 6 平台的开源实现,它与 Sun 的 JDK 不同。

This is explained (cough) in Java SE Naming and Versions:

The current release is Java Platform,
Standard Edition 6 (Java SE 6). The
previous release was Java 2 Platform,
Standard Edition 5.0 (J2SE 5.0).

Sun Microsystems simplified the
platform name in 2006 to better
reflect the level of maturity,
stability, scalability, and security
built into the Java platform. Sun
dropped the "2" from the name and
deleted the "dot number" (the number
following the period). Any updates to
Java platforms will simply be noted as
updates rather than adding a "dot
number" at the end of the platform
name.

Due to significant popularity within
the Java developer community, the
development kit has reverted back to
the name "JDK" from "Java 2 SDK" (or
"J2SDK"). The runtime environment has
reverted back to "JRE" from "J2RE."
(Note that "JDK" stands for "J2SE
Development Kit" in version 5.0.)

For more information on platform names
and version numbers, see the following
pages:

And quoting Java SE 6 Platform Name and Version Numbers:

At this release, the platform name has changed from J2SETM to JavaTM SE. The official name is JavaTM Platform, Standard Edition 6.

Both version numbers (1.6.0 and 6) are used to identify this release of the Java Platform. Version 6 is the product version, while 1.6.0 is the developer version. The number 6 is used to reflect the evolving level of maturity, stability, scalability and security of Java SE.

And J2SE Version 1.5.0 or 5.0?:

Both version numbers "1.5.0" and "5.0" are used to identify this release of the Java 2 Platform Standard Edition. Version "5.0" is the product version, while "1.5.0" is the developer version. The number "5.0" is used to better reflect the level of maturity, stability, scalability and security of the J2SE.

The number "5.0" was arrived at by dropping the leading "1." from "1.5.0". Where you might have expected to see 1.5.0, it is now 5.0 (and where it was 1.5, it is now 5).

So, to summarize, the whole naming is a mess but this is finally over and the current platform name is JavaTM Platform, Standard Edition 6 (abbrev. JavaTM SE 6). Two Products are delivered under the platform: the JDKTM 6 and the JRETM 6.

OpenJDK 6 is an open-source implementation of the Java SE 6 Platform, it's different from Sun's JDK.

八巷 2024-08-31 02:11:35
  • Java 1.5.x 与 Java 5.x 相同
  • Java 1.6.x 与 Java 6.x 相同

基本上扔掉版本号的 1. 部分。

  • Java 1.5.x is the same as Java 5.x
  • Java 1.6.x is the same as Java 6.x

Basically throw away the 1. part of the version number.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文