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

Documentation of jar -C option

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P5 P5
    • tbd
    • 5.0
    • tools
    • None
    • jar
    • Cause Known

      Re: http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/jar.html

      The documentation to the JAR tool describes the `-C' flag as "Temporarily changes directories (cd dir) during execution of the jar command while processing the following inputfiles argument". In the Synopsis section, it says: "Multiple -C dir inputfiles sets are allowed."

      The "Inputfiles" argument is defined as "Files or directories, separated by spaces, to be combined into jarfile [...]".

      I understood this to mean that one -C option applies to all following arguments until the next -C option is seen. However, it applies only to the immediately next argument; further inputfiles are searched for relative to the original working directory.

      I ask that the wording be clarified (e.g., `inputfiles' could be replaced by `inputfile').

      However, you could also considering modifing the behavior of the JAR utility to actually change directory for all following inputfile arguments until the next -C argument; this is how (at least) GNU tar(1) works and your documentation does state "[-C's] operation is intended to be similar to the -C option of the UNIX tar utility."

            sherman Xueming Shen
            abuckley Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: