Java10 – Time-Based Release Versioning | new version string format in java
Java 10 New Release Feature
This post discusses how Java 10 introduced a new release pattern based on time.
It includes releases with new features, updates, long-term support for Java, and JDK’s present and future releases.
The JDK Enhancement Proposal number is JEP 322🔗 - time-based release new version schema.
This approach allows end-users to make decisions based on releases, whether to upgrade to the latest version or not.
Different major or minor versions are released every year, incorporating features, bug fixes, and critical updates.
Java Major or Feature Release Process
Major releases occur every six months, specifically in March and September. These releases encompass significant changes to Java SDK and JDK, including.
- Adding JVM features
- Implementing major language changes
- Modifying APIs
- Deprecating or removing features
Update or Quarter Release Process
Quarterly releases focus on bug fixes, regression testing, and minor improvements. These updates are released every quarter in January, April, July, and October.
Existing release version information
B:\>java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
The new version format is as follows:
Java 10 New Version String Format
$FEATURE.$INTERIM.$UPDATE.$PATCH
There are four parts of a new version format
$FEATURE
: The version number of a feature, starting from 10, incrementing every six months.
$INTERIM
: A number representing interim releases, including bug fixes with no major API changes. The counter resets to zero every six months. $UPDATE
: An update release versioning number occurring every quarter.
For example, July 2018 release is 10.0.2, October 2018 release is 10.0.3, and December 2018 release is 10.0.4. $PATCH
: Patch release or emergency release for priority one or critical issues. $EMERG
: Emergency release
Java 10 Classes
With Java 10 release, version information can be obtained using the Runtime.version()
method, which returns the Runtime.Version
Java class.
Here is an example using java.lang.Runtime.Version:
public class VersionDemo {
public static void main(String[] args) {
Runtime.Version version = Runtime.version();
int feature = version.feature();
int interim = version.interim();
int update = version.update();
int patch = version.patch();
System.out.println(" feature:" + feature);
System.out.println(" interim: " + interim);
System.out.println(" update: " + update);
System.out.println(" patch: " + patch);
}
}
output:
feature:10
interim: 0
update: 2
patch: 0
Finding Version Release Information for System Properties in Java
There are two system properties java.version.date
: The release date of the release. java.vendor.version
: Version information of an implemented vendor.
Here is an example for java version date and vendor version
public class VersionDemo {
public static void main(String[] args) {
System.out.println(System.getProperty("java.version.date"));
System.out.println(System.getProperty("java.vendor.version"));
}
}
Long-term release support
As of September 2018, every major or feature release has an update for at least three years. Customers receive long-term support from Oracle for any major feature.