src/share/classes/sun/tools/jps/Jps.java

Print this page
rev 8717 : 8027765: Make exit codes and stdout/stderr printing from jmap/jinfo/jstack/jps consistent
Reviewed-by:

*** 43,57 **** try { arguments = new Arguments(args); } catch (IllegalArgumentException e) { System.err.println(e.getMessage()); Arguments.printUsage(System.err); ! return; } if (arguments.isHelp()) { ! Arguments.printUsage(System.out); System.exit(0); } try { HostIdentifier hostId = arguments.hostId(); --- 43,57 ---- try { arguments = new Arguments(args); } catch (IllegalArgumentException e) { System.err.println(e.getMessage()); Arguments.printUsage(System.err); ! System.exit(1); } if (arguments.isHelp()) { ! Arguments.printUsage(System.err); System.exit(0); } try { HostIdentifier hostId = arguments.hostId();
*** 163,170 **** --- 163,171 ---- System.err.println(cause.getMessage()); } else { e.printStackTrace(); } } + System.exit(1); } } }