第四个数字在Java 9的版本字符串方案中意味着什么? [英] What does the 4th number mean in Java 9's version string scheme?

查看:167
本文介绍了第四个数字在Java 9的版本字符串方案中意味着什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此博客的版本应该类似于MAJOR.MINOR.SECURITY,即,应该有3个数字和2个句点之间.

According to this blog on Java 9's new version string scheme, the version is supposed to be like MAJOR.MINOR.SECURITY, i.e., there are supposed to be 3 numbers and 2 periods in between.

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

However, with Azul's Zulu 9, when I print the Java version, it has 4 numbers and 3 periods:

./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)

这四个数字代表什么?

推荐答案

该博客帖子过时了. Java 9中实际实现的方案记录在 JEP 223:新版本字符串方案

That blog posting is a bit out of date. The actually implemented scheme in Java 9 is documented in JEP 223: New Version-String Scheme

前三个数字的含义已标准化.后面第四个和(任何)数字的含义留给卖方指定.

The meaning of the first three numbers is standardized. The meaning of the 4th and (any) subsequent numbers are left to the vendor to specify.

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

Note also the interesting relationship between the 2nd and 3rd numbers.

这是JEP的相关部分.

Here are the relevant parts of the JEP.

"该序列可以具有任意长度,但是前三个元素分配有特定含义,如下所示:

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

$MAJOR.$MINOR.$SECURITY

$MAJOR-主要版本号,对于包含Java SE Platform Specification的新版本(例如,用于Java SE 8的JSR 337)中指定的重要新功能的主要发行版,该版本号递增.主要版本,请提前通知至少一个主要版本,并在有充分理由的情况下进行不兼容的更改. JDK 8的$MAJOR版本号是8; JDK 9的$MAJOR版本号为9.增加$MAJOR时,将删除所有后续元素.

$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-次要版本号,对于次要更新版本递增,其中可能包含兼容的错误修复程序,相关平台规范的维护版本要求的标准API的修订版以及该规范范围之外的实现功能,例如作为新的特定于JDK的API,其他服务提供商,新的垃圾收集器以及新硬件体系结构的端口.

$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-对于安全更新版本,其安全级别已提高,其中包含一些重要的修复程序,包括提高安全性所必需的修复程序.当$MINOR递增时,$SECURITY不会重置为零.因此,对于给定的$MAJOR值,较高的$SECURITY值始终表示更安全的释放,而与$MINOR的值无关.

$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.

版本号的第四个及更高版本元素可供JDK代码库的下游使用者免费使用.例如,这样的使用者可以使用第四个元素来标识修补程序版本,该修补程序版本除了对应的安全版本中的安全修补程序外,还包含少量关键的非安全修补程序.

这篇关于第四个数字在Java 9的版本字符串方案中意味着什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆