Hi Henrique, With CLI 1.x you would do it like this :
Options options = new Options();
options.addOption(OptionBuilder.hasArgs(2).create("myoption"));
CommandLine cmd = new DefaultParser().parse(options, new String[] {
"-myoption", "argument1" });
If an argument is missing a MissingArgumentException is thrown. Emmanuel Bourg Le 23/02/2011 19:46, Henrique Seganfredo a écrit :
Hello, Could please someone post an example of Commons CLI to have na option with two mandatory arguments? Example: ./myprog -myoption<argument1> <argument2> Many thanks, Henrique Seganfredo --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
smime.p7s
Description: S/MIME Cryptographic Signature
