tags:

views:

220

answers:

3

I need to write a simple shell-style application in Java. It would be nice to use a library that takes care of parsing commands and takes care of things like flags and optional/mandatory parameters...

Something that has built-in TAB completion would be particularly great.

+2  A: 

BeanShell ?

Morendil
Is this actively maintained? The website doesn't have any release dates, and docs for version 2 aren't available yet.
Dana the Sane
+3  A: 

You can use JLine for editing and Apache Commons CLI for command line parsing.

Sean McCauliff
+1  A: 

I much prefer either JewelCLI or args4j over Apache Commons CLI.

There is a good, if somewhat inflammatory, roundup of several java CLI options parsers here.

Jason Day