|
2 weeks ago | |
---|---|---|
src | 2 weeks ago | |
.gitignore | 2 years ago | |
README.md | 2 weeks ago | |
pom.xml | 2 weeks ago |
A simple java helper library for processing command line arguments.
Include the library in your project by adding the following dependency to your pom.xml
<dependency>
<groupId>com.mclarkdev.tools</groupId>
<artifactId>libargs</artifactId>
<version>1.5.1</version>
</dependency>
Initialize the library by using the array of arguments passed into the main class.
public static void main(String[] args) {
LibArgs.instance().parse(args);
System.out.printf("Hello, %s.", LibArgs.instance().getString("name"));
}
Then simply run your application with the desired arguments:
$ java -jar myApp.jar --name world
Hello, world.
Open source & free for all. ❤