commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Luo <>
Subject [CLI] problem using cli
Date Thu, 05 Dec 2002 17:06:53 GMT
I've encounted two problems with CLI:

1. option with argument cannot be placed in the end of the command line. For

    cli -buildfile connect.xml -debug -emacs -help -logger

    Exception in thread "main"
org.apache.commons.cli.MissingArgumentException: no argument for:logger
        at org.apache.commons.cli.Parser.processArgs(
        at org.apache.commons.cli.Parser.processOption(
        at org.apache.commons.cli.Parser.parse(
        at org.apache.commons.cli.Parser.parse(

2. the trailing arguments are not retrievable by CommandLine.getArgs(). For

   cli -buildfile connect.xml -debug -emacs -help a1 a2 a3

   a1, a2 a3 can not be retrieved by calling CommandLine.getArgs().

I'll attach my test program. Pls help. Thanks.


PRIVILEGED AND CONFIDENTIAL: This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary, confidential
and/or privileged information.  If you are not the intended recipient, any
use, copying, disclosure, dissemination or distribution is strictly
prohibited.  If you are not the intended recipient, please notify the sender
immediately by return e-mail, delete this communication and destroy all

View raw message