Permalink
Browse files

Add command line help

  • Loading branch information...
1 parent 775cf9f commit ac08b19558518d094f0656b346273107622c6406 Norbert Hu committed Apr 4, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 src/main/java/com/foursquare/heapaudit/HeapAudit.java
View
21 src/main/java/com/foursquare/heapaudit/HeapAudit.java
@@ -116,6 +116,27 @@ public static void main(String[] args) throws Exception {
if (args.length > 0) {
+ for (int i = 0; i < args.length; ++i) {
+
+ String arg = args[i].toLowerCase();
+
+ if (arg.equals("?") ||
+ arg.equals("-?") ||
+ arg.equals("/?") ||
+ arg.equals("-h") ||
+ arg.equals("--help")) {
+
+ System.out.println("HeapAudit command line syntax\n\n" +
+ "> java -jar heapaudit.jar [ <pid> [options] ]\n");
+
+ help();
+
+ return;
+
+ }
+
+ }
+
id = args[0];
}

0 comments on commit ac08b19

Please sign in to comment.