< prev index next >

src/jdk.jcmd/share/classes/sun/tools/jcmd/Arguments.java

Print this page
rev 47329 : 8189102: All tools should support -?, -h and --help

@@ -48,11 +48,12 @@
             /* list all processes */
             processString = "0";
             return;
         }
 
-        if (args[0].equals("-h") || args[0].equals("-help") ) {
+        // -help: legacy. Undocumented.
+        if (args[0].equals("-?") || args[0].equals("-h") || args[0].equals("--help") || args[0].equals("-help")) {
             showUsage = true;
             return;
         }
 
         processString = args[0];

@@ -114,8 +115,8 @@
         System.out.println("  If no options are given, lists Java processes (same as -l).     ");
         System.out.println("                                                                  ");
         System.out.println("  PerfCounter.print display the counters exposed by this process  ");
         System.out.println("  -f  read and execute commands from the file                     ");
         System.out.println("  -l  list JVM processes on the local machine                     ");
-        System.out.println("  -h  this help                                                   ");
+        System.out.println("  -? -h --help this help                                          ");
     }
 }
< prev index next >