Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8050071

JEP 231: Remove Launch-Time JRE Version Selection

    Details

    • Author:
      Kumar Srinivasan
    • JEP Type:
      Feature
    • Exposure:
      Open
    • Subcomponent:
    • Scope:
      JDK
    • Discussion:
      core dash libs dash dev at openjdk dot java dot net
    • Effort:
      S
    • Duration:
      S
    • Alert Status:
       Green
    • JEP Number:
      231

      Description

      Summary

      Remove the ability to request, at JRE launch time, a version of the JRE that is not the JRE being launched.

      Motivation

      The "Multiple JRE" ("mJRE") feature allows a developer to specify what JRE version, or range of versions, can be used to launch an application. The version-selection criteria can be specified in a manifest entry of the application's jar file (JRE-Version) or as a command-line option (-version:) to the java launcher. If the version of the JRE that is launched does not satisfy the criteria then the launcher searches for a version that does, and if it finds one then it launches that version.

      Deploying an application, in practice, requires doing more than just selecting a particular JRE. Modern applications are typically deployed via Java Web Start (JNLP), native OS packaging systems, or active installers, and all of these technologies have their own ways of finding, and even sometimes installing and later updating, an appropriate JRE for the application.

      The mJRE feature addresses only one part of the overall deployment problem. It was, moreover, never fully documented when it was introduced in JDK 5: The -version: option is mentioned in the documentation of the java command but the JRE-Version manifest entry is not mentioned in any of the usual JDK documentation, nor in the Java SE Platform Specification. So far as we know, this feature was very rarely used. It needlessly complicates the implementation of the Java launcher, making it burdensome to maintain and enhance.

      Description

      Remove the mJRE feature. Modify the launcher as follows:

      • Emit an error message and exit if the -version: option is given on the command line, and

      • Emit a warning message and continue if the JRE-Version manifest entry is found in a jar file.

      The rationale for a warning rather than a fatal error in the second case is that the manifest entry might be present in old jar files which cannot readily be modified, and so it's better to continue rather than abort. We expect to change this case to a fatal error in JDK 10.

      Testing

      Testing is required to ensure that the feature is removed and the appropriate warnings and errors are reported.

        Issue Links

          Activity

          Hide
          mr Mark Reinhold added a comment -
          I've rewritten this to capture what I believe to be your intent, based
          on your original text and your comments. If this looks good to you then
          assign it back to me and I'll move it to Candidate.
          Show
          mr Mark Reinhold added a comment - I've rewritten this to capture what I believe to be your intent, based on your original text and your comments. If this looks good to you then assign it back to me and I'll move it to Candidate.
          Hide
          ksrini Kumar Srinivasan added a comment -
          Thank you so much.
          Show
          ksrini Kumar Srinivasan added a comment - Thank you so much.

            People

            • Assignee:
              ksrini Kumar Srinivasan
              Reporter:
              ksrini Kumar Srinivasan
              Owner:
              Kumar Srinivasan
              Reviewed By:
              Alan Bateman, Joe Darcy, Neil Toda
              Endorsed By:
              Brian Goetz
            • Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:
                Integration Due: