Java 10 Time-Based Release Versioning


Java 10, Oracle has adapted time-based version-string scheme The new time-based model has replaced the feature-based.

A new Java release every six months. The March 2018 release is JDK 10, the September 2018 release is JDK 11, and so forth. These are called feature releases and are expected to contain at least one or two significant features
Support for the feature release will last only for six months, i.e., until next feature release Long-term support release will be marked as LTS. Support for such release will be for three years

Java version format

If you run command java -version in comaand prompt/terminal the you will get outout version information like this:

Command Prompt
C:\Users\Lokesh>java -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

The new format of the version number is:

$FEATURE.$INTERIM.$UPDATE.$PATCH

Java Version API

Runtime.version() can be used to get version counter values programmatically. e.g.

Version version = Runtime.version();
version.feature();
version.interim();
version.update();
version.patch();
 
Output:
 
10
0
1
0

Parse existing version

Version version = Runtime.Version.parse("10.0.1");
 
version.feature();
version.interim();
version.update();
version.patch();





javacodegeeks is optimized for learning.© javacodegeeks .
All Right Reserved and you agree to have read and accepted our term and condition