RFR: 8340133: Add concise usage message to the java executable [v7]

Alan Bateman alanb at openjdk.org
Mon Nov 11 14:29:59 UTC 2024


On Mon, 11 Nov 2024 14:16:25 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 11 additional commits since the last revision:
>> 
>>  - Merge branch 'master' into JDK-8340133-2
>>  - Using correct pplaceholders.
>>  - Adjusting text as suggested.
>>  - Cleaning up the concise message:
>>    - using 2 spaces instead of 4,
>>    - rewording the "for more use --help" part of the message as suggested to avoid the word "launcher".
>>  - Using lowercase for the keys in the help, using 'source-file' program instead of 'single-file' program.
>>  - Using an enum instead of booleans, as suggested.
>>  - Adjusting the concise help as suggested: 'using main class of a JAR archive' and '<JarFile>.jar'/'<SourceFile>.java'
>>  - Adjusting the concise help based on review suggestions.
>>  - Cleanup.
>>  - Adjusting/improving the concise help.
>>  - ... and 1 more: https://git.openjdk.org/jdk/compare/7f4880aa...b4d7b493
>
> src/java.base/share/classes/sun/launcher/LauncherHelper.java line 598:
> 
>> 596:     static void printConciseUsageMessage(boolean printToStderr) {
>> 597:         initOutput(printToStderr);
>> 598:         ostream.println(SharedSecrets.getJavaLangAccess().shortVersionString());
> 
> What is the reason for printing the short version string at the start of the short usage message?

In passing, it may be better to pick "short" or "concise", right now it's a mix in the method and resource keys.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21411#discussion_r1836751174


More information about the core-libs-dev mailing list