Java Library: Command Line Option Parser [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
开发者_StackOverflow社区 Improve this questionAnyone know of a library that handles parsing arguements passed from the command line (IE: args[] in public static main).
Apache commons-cli.
I've used jopt-simple
and found it pretty simple. Their webpage lists about 10 other similar libraries...
try cli-parsec
http://search.maven.org/#search|ga|1|a%3A%22de.dr1fter.cli-parsec%22
maven dependency (currently latest version):
<dependency>
<groupId>de.dr1fter</groupId>
<artifactId>de.dr1fter.cli-parsec</artifactId>
<version>0.2.1</version>
</dependency>
documentation wiki: https://github.com/dr1fter/cli-parsec/wiki/Example
GNU getopt for Java. Kinda old but it is a good getopt port from GNU that I have used in the past. It works just like the C version : http://www.urbanophile.com/~arenn/hacking/download.html
精彩评论