Verona spec: System properties

Iris Clark iris.clark at oracle.com
Fri Jun 19 03:20:37 UTC 2015


Hi.

The original draft of the JEP did not include specification for the format of returned values for the version-related system properties.  We take a low-risk, minimum impact approach defining the pre-existing implementation in terms of the new version string components.

I've added a section for System properties containing the following:

  - A general syntax is defined for each of the five affected system properties: java{.vm}?.version, java.runtime.version, java{.vm}?.specification.version .
  - Examples for each of the release types is provided.
  - A warning that all system properties for major releases will NOT contain `.` is provided.

Complete diffs are appended to this message.

Please let me know if there are any concerns.

Thanks,
iris

----
155c155
< A _version string_ consists of a version number `$VNUM`, as described
---
> A _version string_ `$VSTR` consists of a version number `$VNUM`, as described
306a307,361
> ### System properties
>
> The values returned by the following [system properties][props] are modified
> by this JEP.  The general syntax is as follows:
>
>     Name                            Syntax
>     ------------------------------  --------------
>     java.version                    $VNUM(\-$PRE)?
>     java.runtime.version            $VSTR
>     java.vm.version                 $VSTR
>     java.specification.version      $VNUM
>     java.vm.specification.version   $VNUM
>
> The system property `java.class.version` is not affected.
>
> The following table shows the existing and proposed values for different
> release types:
>
>     System Property                   Existing      Proposed
>     -------------------------------   ------------  --------
>     Early Access
>       java.version                    1.9.0-ea      9-ea
>       java.runtime.version            1.9.0-ea-b73  9-ea+73
>       java.vm.version                 1.9.0-ea-b73  9-ea+73
>       java.specification.version      1.9           9
>       java.vm.specification.version   1.9           9
>
>     Major (GA)
>       java.version                    1.9.0         9
>       java.runtime.version            1.9.0-b100    9+100
>       java.vm.version                 1.9.0-b100    9+100
>       java.specification.version      1.9           9
>       java.vm.specification.version   1.9           9
>
>     Minor #1 (GA)
>       java.version                    1.9.0_20      9.1.2
>       java.runtime.version            1.9.0_20-b62  9.1.2+62
>       java.vm.version                 1.9.0_20-b62  9.1.2+62
>       java.specification.version      1.9           9
>       java.vm.specification.version   1.9           9
>
>     Security #1 (GA)
>       java.version                    1.9.0_5       9.0.1
>       java.runtime.version            1.9.0_5-b20   9.0.1+20
>       java.vm.version                 1.9.0_5-b20   9.0.1+20
>       java.specification.version      1.9           9
>       java.vm.specification.version   1.9           9
>
> Note that all code which has historically detected `.` in any of these system
> properties as part of version identification will need to be examined and
> potentially modified.  For example,
> `System.getProperty("java.version").indexof('.')` will return `-1` for major
> releases.
>
> [props]: http://docs.oracle.com/javase/8/docs/api/java/lang/System.html#getPro
perties--


More information about the verona-dev mailing list