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

java launcher: support jar launch without -jar option

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Withdrawn
    • Icon: P2 P2
    • 9
    • 7
    • tools
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: