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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 12
    • 9, 12
    • 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.

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

              Created:
              Updated:
              Resolved: