commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Razvan Surdulescu" <>
Subject [CLI] Documentation problems?
Date Wed, 21 May 2003 18:10:30 GMT
There seem to be some problems in the CLI documentation:

1. In the section entitled "Parsing the command line arguments", the
following code does not compile since Options does not have a parse()

CommandLine cmd = options.parse(args);

2. I am not able to have command line options of the form "-word" where
"word" is longer than 1 letter, although the documentation seems to imply
that this should be possible via the "ANT Example".

Specifically, the following snippet:

        Options options = new Options();
                .withDescription("dynamically generate mining model XML")

        CommandLineParser parser = new PosixParser();
        try {
            CommandLine line = parser.parse(options, args);
        } catch (ParseException pe) {

fails with:

Unrecognized option: -g

when I execute it with:

javaw.exe -classpath commons-cli-1.0.jar Test -generate

View raw message