public static void main(String args[]) { ProfileInspector profileInspector = new ProfileInspector(); Profile resultingProfile = null; if (args.length < 1 || args[0].indexOf("help") >= 0) { usage(); System.exit(0); } else { try { ArgumentProcessor.processArgs(args, ARG_DEFS, profileInspector); resultingProfile = profileInspector.processProfile(); } catch (ArgumentErrorException e) { System.err.println("Error processing command-line arguments: " + e.getMessage()); usage(); System.exit(255); } catch (Exception e) { System.err.println("Error proccessing:"); e.printStackTrace(); System.exit(1); } System.out.println(resultingProfile.getHumanOutput()); } }