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

java -version:release option does not work as documented

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • Icon: P2 P2
    • None
    • 7u11
    • tools
    • None
    • I've seen this on MacOS X and Linux.

    • x86
    • linux, os_x
    • Not verified

      The java CLI manual page says that a version string can be used with the -version:release option to specify that a particular version of the JRE should be used to run a JAR or class file.

      Consider the following:

      $ java -version
      java version "1.7.0_11"
      Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
      Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
      $ java -version:1.7+ myjar.jar
      Error: Unable to locate JRE meeting specification "1.7+"
      $ java -version:1.7.0_11-b20+ myjar.jar
      Error: Unable to locate JRE meeting specification "1.7.0_11-b20+"
      $ java -version:1.7* myjar.jar
      Error: Unable to locate JRE meeting specification "1.7*"

      These last three commands should have all ran the myjar.jar file, but none did.

            ksrini Kumar Srinivasan
            tomuell Tom Mueller (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: