Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the 4th number mean in Java 9's version string scheme?

Tags:

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.

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)

What do the 4 numbers represent ?

like image 244
Anjana Avatar asked Nov 07 '17 10:11

Anjana


People also ask

What does each number in a version mean?

The leftmost number (1) is called the major version. The middle number (2) is called the minor version. The rightmost number (3) is called the revision but it may also be referred to as a "point release" or "subminor version".

Why do versions have 3 numbers?

The numbers represent different versions of the same software or application, and the numbers assigned increase to correspond to the latest development and releases. Subsequent releases of the same product can also be assigned numerical identifiers consisting of two or three numbers separated by periods.

How do you read a version number?

Structure of Version Numbers Version numbers are usually divided into sets of numbers, separated by decimal points. Typically, a change in the leftmost number indicates a major change in the software or driver. Changes in the rightmost number often indicate a minor change.

What version of Java is JDK 9?

Java™ SE Development Kit 9.0. 4 (JDK 9.0. 4) The full version string for this update release is 9.0.


1 Answers

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.

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

like image 193
Stephen C Avatar answered Sep 21 '22 01:09

Stephen C