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

java launcher: support jar launch without -jar option

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P2
    • Resolution: Withdrawn
    • Affects Version/s: 7
    • Fix Version/s: 9
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Currently to launch executable jar it is required to use following syntax
          java -jar a.jar

      The request here is to allow for
           java a.jar

      This is important for scenario where jar is launched by doubleclick.
      Windows and window managers on Linux allow user to select what program should be used for files with specific extension.
      However, they do not provide UI to specify command format. Hence there is no easy way for user to
      create association manually. JRE installers create default associations but this does not work for all users
      (may have user association created for various reasons and then it is not easy to fix).

      Technically, this request means java launcher should distinguish whether it is request to launch class or jar file
      but this should be fairly easy to detect by checking magic numbers in the file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ntoda Neil Toda (Inactive)
                Reporter:
                igor Igor Nekrestyanov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: