commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatthews <>
Subject CLI short option name in error message, when long was given as parameter
Date Wed, 13 May 2009 15:03:45 GMT

I have a series of parameters in short and long form where the last one in
the following example takes an argument:

-s -t exploration -v dnd --fixture

The error that I get with CLI using the following code 

        final CommandLineParser parser = new BasicParser();
        this.cmd = null;
        try {
            cmd = parser.parse(options, args);
        } catch (final ParseException e) {
            return false;


  Error: no argument for:f

Why does it give the message using the short option name rather than the
long option name that was used?  Is my recollection  that it has changed
correct, or is this the way it always worked?  Is there some way of changing
this behaviour.

Many thanks
Robert Matthews
View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message