Tuesday, August 14, 2018

Learn Java10 features – Time-Based Release Versioning | new version string format in java

java 10 New release feature 

This post is about how Java 10 introduced a new release pattern on time-based. This includes releases based on new features, updated release, longterm support of java and JDK present and future releases.JDK enhancement proposal number is JEP 322- time-based release new version schema.
This allows end users to take a decision based on the release whether to upgrade to latest release or not. There are different major or minor versions on every year based on the features,  bug fixes, and critical fixes.

Major Or feature release process

This release will be happened for every 6 months - March and September.
This includes major changes of Java SDK and JDK for the following changes.
  • Adding JVM  features
  • Adding Major Language changes
  • Changes in API
  • Deprecated/Remove changes or features

Update or quarter release process

This release includes fixes for bug and regression testing issues and minor issues. This will be released for every quarter - Jan, Apr, Jul, Oct.
The 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)
This will be changed to new version format as below

New Version String Format

$FEATURE.$INTERIM.$UPDATE.$PATCH
There are four parts of a new version format
$FEATURE - This will be a version number of a feature, starting number is 10. This will be incremented for every six
$INTERIM - This is a number representing interim release. This includes bug fixes, no major API changes. The counter number starts from zero for every six months.

$UPDATE - update release versioning number. This occurs for every quarter.
If it is July 2018 release - It will be 10.0.2
If it is Oct 2018 release - It will be 10.0.3
If it is Dec 2018 release - It will be 10.0.4
$PATCH- Patch release or emergency release for priority one or critical issues
$EMERG - Emergency release

Java Version classes

With Java 10 release, We can get version information with below classes.
using Runtime. Version java class, we can get new version information

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 is
 feature:10
 interim: 0
 update: 2
 patch: 0

System properties for Version release information

java.version.date
This is the the release date of the release
java.vendor.version
Version information of an implemented vendor

Long-term release support

Customers have long-term support from Oracle for any major feature.
From Sep 2018, Every major or feature release has an update for a release for at least three years.

Please share/like/comment it in facebook/twitter.

Related article


EmoticonEmoticon