A New JDK 9 Version String Scheme

December 6, 2015 | 2 minute read
Dalibor Topic
Principal Product Manager
Text Size 100%:

One of the smaller, but rather important planned changes for JDK 9 is an updated JDK version string scheme. It is described in detail in JEP 223.

The new version string scheme makes it easier to distinguish major, minor and critical patch update (CPU) releases, by encoding each property into a separate numerical component as part of a JDK version string. Following the new MAJOR.MINOR.SECURITY convention, JDK 9 version strings would start with ‘9’ for the MAJOR release component.

For example, if the JDK 9 GA release (with the version string: ‘9’) were to be followed by a CPU, then that CPU would carry the version string ‘9.0.1’. If that CPU were to be followed by a minor release with additional changes on top of those already found in the ‘9.0.1’ release, than the new release would carry the version string ‘9.1.1’. If in turn, that minor release were to be followed by another CPU, the new CPU would be designated as ‘9.1.2’, leading to the following hypothetical sequence of release versions:

 9  GA
 9.0.1  CPU: 9 + critical changes
 9.1.1  Minor release: 9.0.1 + other changes
 9.1.2  CPU: 9.1.1 + critical changes
 9.2.2  Minor release: 9.1.2 + other changes
 9.2.3  CPU: 9.2.2 + critical changes
 9.2.4  CPU: 9.2.3 + critical changes
 9.3.4  Minor release: 9.2.4 + other changes

The individual components of the version string would start at 0 and then increase based on the type of a release, making it easy to check whether a local installation meets a given security baseline by looking at the third, i.e. SECURITY, component of the JDK 9 version string.

Due to the changes in the version string scheme, code that parses JDK version strings could need to be adjusted - for example if it assumes that the first element of a JDK version string always has the value of ‘1’ (as in ‘1.9.0_ea-b19’), and therefore always skips to the second element when comparing releases. Details on the adjustments can be found in the JEP text.

In addition, the JEP text describes other types of information that can be encoded in a JDK 9 version string, like build numbers, as in ‘9.0.1+63’.

Developers, who would like to test the planned changes, can do so by downloading a JDK 9 Early Access Build at jdk9.java.net. Feedback on the planned version string scheme changes should be directed to the verona-dev mailing list.

Dalibor Topic

Principal Product Manager

Dalibor Topić lives in Hamburg, Germany, and works as principal product manager for Oracle. He joined the OpenJDK project in order to help make it a successful open source project, and stayed for anchoring Java in Linux distributions, and as an all around Java F/OSS community guy. Topić joined the Java strategy team at Oracle to help provide community feedback into the long-term strategy planning.

Previous Post

Press Your Button for Raspberry Pi

Yolande Poirier | 1 min read

Next Post

Programming Contest: The Greeps are Coming!

Yolande Poirier | 1 min read