Java Hello World cli using args4j

A simple example of how to use args4j to add command line args to a simple “Hello World” type java application.

For example below command line execution would print “Hello arg4j!” instead of the default “Hello World!” if you don’t pass any args.

$ java -jar helloWorldParamaterized --msg='Hello arg4j!' 

Leave a Reply