Skip to content

Instantly share code, notes, and snippets.

@wspeirs
Created January 18, 2013 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wspeirs/4569447 to your computer and use it in GitHub Desktop.
Save wspeirs/4569447 to your computer and use it in GitHub Desktop.
Parsing a command line
final GnuParser parser = new GnuParser();
final Options options = configureOptions();
// parse with the parser
CommandLine cmdLine = null;
try {
cmdLine = parser.parse(options, args);
} catch(ParseException e) {
e.printStackTrace();
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment