I need to write a simple command-line 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...
UPDATE
Something that has built-in TAB completion would be particularly great.
I've used the Apache Commons CLI library for command-line argument parsing. It's fairly easy to use and has reasonably good documentation.
Which library you choose probably comes down to which style of options you prefer ("--gnu-style" or "-javac-style").