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

jar usage string mentions unsupported option

XMLWordPrintable

    • jar
    • b01
    • Verified

        Starting from 7u79, the usage string of jar utility mentions the option '-n', though it is not supported in Java 7.
        ----------
        C:\Program Files\Java\jdk1.7.0_79\bin>jar
        Usage: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ...
        Options:
            -c create new archive
            -t list table of contents for archive
            -x extract named (or all) files from archive
            -u update existing archive
            -v generate verbose output on standard output
            -f specify archive file name
            -m include manifest information from specified manifest file
            -e specify application entry point for stand-alone application
                bundled into an executable jar file
            -0 store only; use no ZIP compression
            -P preserve leading '/' (absolute path) and ".." (parent directory) components from file names
            -M do not create a manifest file for the entries
            -i generate index information for the specified jar files
            -C change to the specified directory and include the following file
        If any file is a directory then it is processed recursively.
        ...
        C:\Program Files\Java\jdk1.7.0_79\bin>jar -n
        Illegal option: n
        Usage: jar {ctxui}[vfmn0PMe] [jar-file] [manifest-file] [entry-point] [-C dir] files ...
        Options:
            -c create new archive
            -t list table of contents for archive
            -x extract named (or all) files from archive
        ...
        ----------
        It looks like a copy-paste error during backporting from Java 8/9.
        Not reproducible with 7u76.

              robm Robert Mckenna
              nikgor Nikolay Gorshkov
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: