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

Alan Bateman alanb at openjdk.org
Tue Nov 12 19:17:20 UTC 2024


On Tue, 12 Nov 2024 18:28:33 GMT, Kevin Bourrillion <duke at openjdk.org> wrote:

> About the version string: I think I first proposed including it. If we don't, then I think that `-version` ought to be in the shortlist of options we show here (not just in full help), so it doesn't become a _three_ step goose chase for the user to find it.
> 
> To me, it feels more user-friendly to just give the version, than to tell the user how they can ask for it and make them ask again. And it seems to take about the same amount of space either way. But maybe there are counterarguments I don't know of.

I'm not opposed to it but if is printed then I think it should be the same as the first line of the java -version output. Believe it or not, the launcher has weirdness in this area where it prints slightly different version output when it's printing to stdout or stderr. The current changes in the PR use the format for stdout but it is printing to stderr. So maybe it will look better if that is fixed. To see what I mean, try `java` && `java -version` to see the difference.

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

PR Comment: https://git.openjdk.org/jdk/pull/21411#issuecomment-2471358404


More information about the core-libs-dev mailing list