Parsing command line arguments is a common task, lets see how we can use JCommander to get it done nice and tidy. — Parsing command line naively Lets take a look at typical java main method: I’m using maven, so my POM file is: My pom includes the maven assembly plugin with reference to the public static main method, this will create a self contained jar file with all dependencies that I can run with java runtime.