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

jar tool does not allow setting the module version without also setting the main class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9, 12
    • Fix Version/s: 12
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
      jar
    • Resolved In Build:
      b23

      Description

      The jar tool has a bug that prevents it setting the module version without also setting the main class. A simple test to demonstrate the issue:

      cat > module-info.java << EOF
      module m { }
      EOF
      javac module-info.java
      jar --create --file foo.jar module-info.class
      jar --update --file foo.jar --module-version 1.0

      The update fails with

      'u' flag requires manifest, 'e' flag or input files to be specified!
      Try `jar --help' for more information.

      If the command is changed to also set the main class then it will succeed.

        Attachments

          Activity

            People

            Assignee:
            lancea Lance Andersen
            Reporter:
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: