Java library: command line option

Does anyone know a library that processes parsing arguments passed from the command line (IE: args [] in the public static main).

+4
source share
4 answers

Apache commons-cli.

+6
source

I used jopt-simple and found it pretty simple. About 10 other similar libraries are listed on their web page ...

+5
source

try cli-parsec http://search.maven.org/#search|ga|1|a%3A%22de.dr1fter.cli-parsec%22 maven (currently the latest version):

 <dependency> <groupId>de.dr1fter</groupId> <artifactId>de.dr1fter.cli-parsec</artifactId> <version>0.2.1</version> </dependency> 

wiki documentation: https://github.com/dr1fter/cli-parsec/wiki/Example

+1
source

GNU getopt for Java. Kinda old, but this is a good GNU getopt port I used in the past. It works the same as version C: http://www.urbanophile.com/~arenn/hacking/download.html

0
source

Source: https://habr.com/ru/post/1304513/


All Articles