Friday, November 13, 2009

Java CLI Library

Some Java command line parsing library available.

Programmatic-style
Options structure are created programmatically, so do the parameter retrieval.

Commons CLI
Workable and can fulfill most common usage scenario.
http://commons.apache.org/cli/

Commons CLI2
Redesign from Commons CLI. Sounds promising and fixes a lot of design flaws or deficit of CLI 1.x. However it seems abandoned and progress is slow.
http://commons.apache.org/sandbox/cli2/

DPML Commons CLI2 fork
A fork of original CLI2 project
http://www.dpml.net/util/cli/index.html

JArgp
http://jargp.sourceforge.net/

jcmdline
http://jcmdline.sourceforge.net/

GNU getopt port
http://www.urbanophile.com/arenn/hacking/download.html

JArgs
http://jargs.sourceforge.net/

JCommando
http://jcommando.sourceforge.net/

JSAP
http://www.martiansoftware.com/jsap/


Auto-binded style
Options structure are done declaratively. Result are transformed and binded to result object.
Most of them are making use of Java5 Annotation.

Args4J
https://args4j.dev.java.net/

parse-cmd
http://code.google.com/p/parse-cmd/

CLI Parser
http://code.google.com/p/cli-parser/

Jewel CLI
http://jewelcli.sourceforge.net/

1 comment:

wsxwhx694 said...
This comment has been removed by a blog administrator.