org.apache.commons.cli.HelpFormatter fmt = new org.apache.commons.cli.HelpFormatter();
fmt.printHelp("<command> [Generic Options] [Job-Specific Options]",
"Generic Options:", ops, "");
PrintWriter pw = new PrintWriter(System.out);
HelpFormatter formatter = new HelpFormatter();
formatter.setGroup(group);
formatter.setPrintWriter(pw);
formatter.printHelp();
formatter.setFooter("Specify HDFS directories while running on hadoop; else specify local file system directories");
formatter.printFooter();
pw.flush();
}