I’ve been trying to copy whatever javac does to be consistent. From the bug report:
* If the arguments are wrong or not specified: exit code != 0, usage output on stderr * If -help or -h is specified: exit code == 0, usage output on stderr /Staffan On 14 Nov 2013, at 11:08, Alan Bateman <alan.bate...@oracle.com> wrote: > On 14/11/2013 09:46, Weijun Wang wrote: >> But it's changing from stdout to stderr in the webrev. At least GNU believes >> [1] it should go to stdout. It make the output more'able. > This is a confusing topic. I think the normal convention is that when there > are invalid arguments that usage message is essentially the error message and > so should go to stderr with the program exiting with an error code. On the > other hand, -help is supposed to print to stderr and exit with a success. We > should double check the launcher to make sure that we are consistent > (although it has its own issues there). > > -Alan.