站内搜索: 请输入搜索关键词

当前页面: 开发资料首页J2SE 专题J2SE SDK/JRE 版本号命名规则

J2SE SDK/JRE 版本号命名规则

摘要: J2SE SDK/JRE 版本号命名规则

Developers may need to know a product's version string for various purposes, depending on whether they are developing and deploying a product or downloading and integrating a product.

The following table explains how to interpret SDK/JRE release version string information.

Note that this convention was not in effect prior to the 1.3.0 feature release. The output of java -version has had the same format since 1.3.1

System Properties and the java -version Command

The output of the java -version command includes a product version identifier and a build indentifier. This output is determined by the values of several system properties, and those system properties can themselves be examined programmatically at runtime.

<table width="100%" cellspacing="1" cellpadding="5" border="1" summary="SDK/JRE System Properties for Product Version and Build Number"> <thead> <tr> <th>System Property Name</th> <th>System Property Content</th> <th>Where Displayed in java -version Output</th> </tr> <tr> <td> java.version </td> <td>
  • product version
</td> <td>
  • Line one displays the product version.
</td> </tr> <tr> <td> java.runtime.version </td> <td>
  • product version
  • product build identifier
</td> <td>
  • Line one displays the product version.
  • Line two displays the build identifier.
</td> </tr> </thead></table>

Numbering Format Specifications

Every SDK/JRE release that is shipped has a product version string and a build identifier associated with it. The general rules for setting either a version string or a build number string are as follows. For more specific rules and examples, see the following table:

  • The content of the java.version system property must always be unique for each external binary.
  • A separator is always used between different parts of the string so that ordering can be determined programmically. (For example, a version string of "1.3.1beta" is not acceptable. A version string of "1.3.1-beta" is acceptable.)
  • The format should be numeric and in lower case where applicable with a period "." within the field itself and a dash "-" between fields.
  • A period "." separator indicates a major version.
  • An underbar "_" separator is used to indicate an update release.
  • A dash "-" separator is used to indicate a non-GA (non-FCS) release.
  • A GA (FCS) product version or build identifier must not contain a dash (-).
  • No asterik "*" or plus sign "+" is allowed, since these are used as wildcards for the matching logic.
  • The content of the java.runtime.version system property can be expanded (beyond that of the java.version system property) to include the build id.
  • All GA (FCS) versions are ordered based on the standard dot-notation. For example: 1.3.0 < 1.3.0_01 < 1.3.1 < 1.3.1_01.

Syntax Notation

Syntax notation used in the following table is:
  • Italics indicate syntax that varies.
  • <-identifier> indicates syntax that is present only for any non-GA (non-FCS) release.

    The identifier is often used to represent a particular milestone, for example:

    • early access
    • beta
    • rc1
<table width="100%" cellspacing="0" cellpadding="0" border="0" class="grey4"><tr><td></td></tr></table>

J2SE Release and Version String Information

<table width="100%" cellspacing="1" cellpadding="5" border="1" summary="J2SE Release Types"> <thead> <tr> <th>Release Type</th> <th>Description</th> <th>Version Numbering Format</th> <th>Example java -version Output Strings</th> </tr> </thead> <tr align="left"> <td valign="top"> Feature </td> <td valign="top"> Contains new functionality. </td> <td valign="top"> n.n.0<-identifier>
  • The final digit is always a 0.
  • The -identifier is required for any non-GA (non-FCS) release.
  • A GA (FCS) release never has a -identifier.
</td> <td valign="top"> The following output indicates a GA (FCS) release having a build indentifier of b24.
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-b24)
Java HotSpot(TM) Client VM (build 1.3.0-b24, mixed mode)
</td> </tr> <tr align="left"> <td valign="top"> Maintenance </td> <td valign="top"> Contains engineering focused bug fixes. </td> <td valign="top"> n.n.n<-identifier>
  • The final digit is never a 0.
  • The -identifier is required for any non-GA (non-FCS) release.
  • A GA (FCS) release never has a -identifier.
</td> <td valign="top"> The following output indicates a beta, maintenance release having a build identifier of 09.
java version "1.3.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-beta-b09)
Java HotSpot(TM) Client VM (build 1.3.1_05-ea-b01, mixed mode)
</td> </tr> <tr align="left"> <td valign="top"> Update </td> <td valign="top"> Contains customer focused bug fixes. </td> <td valign="top"> n.n.n_nn<-identifier>
  • The first three digits are identical to those of the feature or maintenance release that is being updated.
  • The two digits following the underbar indicate the update number. The higher the number, the more recent the update.
  • The -identifier is required for any non-GA (non-FCS) release.
  • A GA (FCS) release never has a -identifier.
</td> <td valign="top"> The output indicates an early access, update release having a build identifier of b01.
java version "1.3.1_05-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_05-ea-b01)
Java HotSpot(TM) Client VM (build 1.3.1_05-ea-b01, mixed mode)

The output indicates a GA (FCS) update release having a build identifier of b02.

java version "1.3.1_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_05-b02)
Java HotSpot(TM) Client VM (build 1.3.1_05-b02, mixed mode)

The output indicates an early access, update release having a build identifier of b01.

java version "1.4.0_03-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_03-ea-b01)
Java HotSpot(TM) Client VM (build 1.4.0_03-ea-b01, mixed mode)

The output indicates a GA (FCS) update release having a build identifier of b04.

java version "1.4.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_03-b04)
Java HotSpot(TM) Client VM (build 1.4.0_03-b04, mixed mode)
</td> </tr> </table>


↑返回目录
前一篇: J2se 1.5 Beta2 开始更名为 J2se 5.0 Beta2
后一篇: Sun announced today the Beta 2 release of the J2SE 5.0 software development kit (JDK)