From 39f927e1507382de1603acf8a64269cb0038c43a Mon Sep 17 00:00:00 2001 From: Henry Jen Date: Wed, 1 Feb 2017 11:05:33 -0800 Subject: [PATCH] 8171524: jar --help doesn't provide information that stdout and stdin can be used as output and input for tool Reviewed-by: sherman --- .../sun/tools/jar/resources/jar.properties | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties index a2e6b5ff94f..7fcc29a3557 100644 --- a/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties +++ b/jdk/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.properties @@ -202,7 +202,15 @@ restore individual classes or resources from an archive.\n\ \ jar --update --file foo.jar --main-class com.foo.Main --module-version 1.0\n\ \ -C foo/ module-info.class\n\ \ # Create a multi-release jar, placing some files in the META-INF/versions/9 directory:\n\ -\ jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes +\ jar --create --file mr.jar -C foo classes --release 9 -C foo9 classes\n\ +\n\ +To shorten or simplify the jar command, you can specify arguments in a separate\n\ +text file and pass it to the jar command with the at sign (@) as a prefix.\n\ +\n\ +\ Examples:\n\ +\ # Read additional options and list of class files from the file classes.list\n\ +\ jar --create --file my.jar @classes.list\ +\n main.help.opt.main=\ \ Main operation mode:\n main.help.opt.main.create=\ @@ -224,7 +232,8 @@ main.help.opt.any=\ \ -C DIR Change to the specified directory and include the\n\ \ following file main.help.opt.any.file=\ -\ -f, --file=FILE The archive file name\n\ +\ -f, --file=FILE The archive file name. When omitted, either stdin or\n\ +\ stdout is used based on the operation\n\ \ --release VERSION Places all following files in a versioned directory\n\ \ of the jar (i.e. META-INF/versions/VERSION/) main.help.opt.any.verbose=\ @@ -264,7 +273,7 @@ main.help.opt.create.update.index.no-compress=\ main.help.opt.other=\ \ Other options:\n main.help.opt.other.help=\ -\ -?, --help[:compat] Give this, or optionally the compatibility, help +\ -h, --help[:compat] Give this, or optionally the compatibility, help main.help.opt.other.help-extra=\ \ --help-extra Give help on extra options main.help.opt.other.version=\