Summary
All tools should support the same set of help flags to display the usage message. Given the proper flag, the tool should display the usage message and terminate gracefully.
Problem
The flags to be used to display the usage message must be known in mind, or guessed by the user (as he can not read the usage before displaying it).
So supporting intuitive and consistent help flags is desired.
Currently, the various tools delivered with the jdk all use different help flags and behave differently.
Solution
Address inconsistencies so that all tools support --help
for help flags, and -h
as shortcut. As several tools already support -?
(common on Microsoft Windows) and because the help flag must be guessed, all tools should also support -?
.
Return code after printing the help message should be '0'.
Other, existing help options (-help
) should still be accepted.
Specification
Add support for -?
, -h
and --help
where missing and if possible. (Flags might already be used for different purpose as -h
.)
Fix return code to be '0'.
Assure behavior by adding a test.
The changes in detail are listed in the following table:
They can also be found in the most recent webrev of "8189102: All tools should support -?, -h and --help": http://cr.openjdk.java.net/~goetz/wr17/8189102-helpMessage/
- csr of
-
JDK-8189102 All tools should support -?, -h and --help
-
- Resolved
-
- relates to
-
JDK-8195844 javapackager should support -?, -h, --help
-
- Closed
-