I use Apache Commons CLI 1.2 to parse the command line, which at the end accepts parameters and additional arguments. Example:mycmd -d DIR extra stuff
I know how to get "extra" and "stuff" using CommandLine.getArgs(), but I don't know how to display these extra arguments in my help. When I call like this:
new HelpFormatter().printHelp("mycmd", opts, true);
I get output like:
usage: mycmd -d DIR
no extra arguments. Can someone point me in the right direction?
source
share