gpt4 book ai didi

version - Java 9 版本字符串方案中的第四个数字意味着什么?

转载 作者:行者123 更新时间:2023-12-02 11:28:03 25 4
gpt4 key购买 nike

根据this blog在 Java 9 的新版本字符串方案中,版本应该类似于 MAJOR.MINOR.SECURITY,即应该有 3 个数字和 2 个句点。

但是,对于 Azul 的 Zulu 9,当我打印 Java 版本时,它有 4 个数字和 3 个句点:

./jdk/bin/java -version
openjdk version "9.0.0.15"
OpenJDK Runtime Environment (Zulu build 9.0.0.15+181)
OpenJDK 64-Bit Server VM (Zulu build 9.0.0.15+181, mixed mode)

这4个数字代表什么?

最佳答案

该博客文章有点过时了。 Java 9 中实际实现的方案记录在JEP 223: New Version-String Scheme中。

前三个数字的含义是标准化的。第四个和(任何)后续数字的含义留给供应商指定。

还要注意第二个和第三个数字之间有趣的关系。

以下是 JEP 的相关部分。

"The sequence may be of arbitrary length but the first three elements are assigned specific meanings, as follows:

$MAJOR.$MINOR.$SECURITY

$MAJOR - The major version number, incremented for a major release that contains significant new features as specified in a new edition of the Java SE Platform Specification, e.g., JSR 337 for Java SE 8. Features may be removed in a major release, given advance notice at least one major release ahead of time, and incompatible changes may be made when justified. The $MAJOR version number of JDK 8 is 8; the $MAJOR version number of JDK 9 is 9. When $MAJOR is incremented, all subsequent elements are removed.

$MINOR - The minor version number, incremented for a minor update release that may contain compatible bug fixes, revisions to standard APIs mandated by a Maintenance Release of the relevant Platform Specification, and implementation features outside the scope of that Specification such as new JDK-specific APIs, additional service providers, new garbage collectors, and ports to new hardware architectures.

$SECURITY - The security level, incremented for a security-update release that contains critical fixes including those necessary to improve security. $SECURITY is not reset to zero when $MINOR is incremented. A higher value of $SECURITY for a given $MAJOR value, therefore, always indicates a more secure release, regardless of the value of $MINOR.

The fourth and later elements of a version number are free for use by downstream consumers of the JDK code base. Such a consumer may, e.g., use the fourth element to identify patch releases which contain a small number of critical non-security fixes in addition to the security fixes in the corresponding security release.

关于version - Java 9 版本字符串方案中的第四个数字意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47156016/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com