Skip to content

Tag: command-line-arguments

How do I parse command line arguments in Java?

What is a good way of parsing command line arguments in Java? Answer Check these out: http://commons.apache.org/cli/ http://www.martiansoftware.com/jsap/ Or roll your own: http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html For instance, this is how you use commons-cli to parse 2 string arguments: usage from command line: