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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 12
    • Affects Version/s: 9, 12
    • Component/s: tools
    • None
    • jar
    • b23

      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.

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

              Created:
              Updated:
              Resolved: