Fix Version/s: 11
Compatibility Risk Description:Only new flags should be added, none removed. If a flag is removed, there should be some output indicating how to get help. If so, users should get along fine.
As displaying the usage is not a common use case, changing the return value should not break anything.
Interface Kind:add/remove/modify command line option
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.
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.
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.
Add support for
--help where missing and if possible. (Flags might already be used for different purpose as
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/