JDK-8144062 : Move jdk.Version to java.lang.Runtime.Version
  • Type: Bug
  • Component: other-libs
  • Sub-Component: other
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-11-25
  • Updated: 2017-05-17
  • Resolved: 2016-05-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b120Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
jdk.Version and jdk.OracleVersion were added for Verona (JEP 223).  At present they are both located in java.base.  Unfortunately, java.base only exports Java SE API per the design principles in JEP 200 The Modular JDK.

A more suitable module for these classes needs to be identified.
Comments
'conformance' and 'tck-red-9' labels were added. Failed JCK tests are under development currently.
22-04-2016

After exploring a few module options (jdk.Version, jdk.dev [0]), it looks like the best choice is to move jdk.Version to java.lang.Runtime.Version (a nested class of Runtime). It supports the values returned by the java.{vm.}?version and java.{vm.}?specification.version system properties. By making Version an SE API, it may be exported by the java.base module. [0] jdk.dev renamed to jdk.jlink in jigsaw/jake
02-03-2016

There is a proposal to promote jdk.Version to be a standard API, in which case it will remain in the base module.
24-02-2016

Code changes for JDK-8150168 and JDK-8150163 may need to be updated depending on how this issue is resolved.
18-02-2016

All anticipated changes to sun.misc.Version for Verona have been made. The only remaining work related to sun.misc.Version is described in JDK-8136651 (update a regression test). Verona provided equivalent functionality modulo changes which were required to support the new version string. Some code owners chose to make additional changes to their code to address technical debt or maintenance issues. Maintainers of sun.misc.Version may choose to further evolve the class as appropriate.
15-02-2016

sun.misc.Version.java.template was updated a number of times during JEP 223 changes. It appears to carry specific static information about the particular build, and is not directly replaceable with jdk.Version. sun.misc.Version is not a critical API, as defined by JEP 260, so must be moved out of the sun.misc package. Note: sun.misc.Version.init() is called by j.l.System during system initialisation so it probably should remain in the base module. What is Verona's position with respect to sun.misc.Version?
11-02-2016

During review, it was determined that jdk.OracleVersion was not needed at this time. JDK-8145793 has been filed to track the request.
13-01-2016