JArgs is a comprehensive command line option parsing suite, for use by Java programmers. It supports simple boolean options, both in long and short forms, and options that take string, integer, or floating point parameters. Boolean options may be conflated together in one option, and any option may be specified any number of times. Anything on the command line that does not start with a hyphen is treated as a normal argument; these can appear anywhere on the command line, and may even be interleaved with options.
java MyProgram -v Short boolean option.
java MyProgram --debug Long boolean option.
java MyProgram -o output.txt Short option with parameter.
java MyProgram --output=output.txt Long option with parameter.
java MyProgram -n 42 Short integer option.
java MyProgram --rate=1.3 Long floating point option.
java MyProgram -bcd Conflated boolean options -b, -c and -d.
java MyProgram -i 2 -i 3 -i 4 Repeated integer options.
java MyProgram -n 42 file1.txt -v Non-option arguments interleaved with options.