8340133: Add concise usage message to the java executable

Reviewed-by: jpai, alanb, ihse, rriggs
This commit is contained in:
Jan Lahoda 2024-12-02 11:21:13 +00:00
parent 0b0f83c01e
commit c7be41ee0c
3 changed files with 97 additions and 54 deletions

View file

@ -589,6 +589,15 @@ public final class LauncherHelper {
}
}
/**
* Prints the short usage text to the desired output stream.
*/
static void printConciseUsageMessage(boolean printToStderr) {
initOutput(printToStderr);
ostream.println(getLocalizedMessage("java.launcher.opt.concise.header",
File.pathSeparator));
}
static void initOutput(boolean printToStderr) {
ostream = (printToStderr) ? System.err : System.out;
}