commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Keyes <j...@mac.com>
Subject Re: [CLI] problem using cli
Date Tue, 10 Dec 2002 22:57:44 GMT
Hi Mike,

Sorry for the delay in responding to your email, I have a bunch of
email to catch up on :-(

With regards to your two problems I have just run the two examples
you specify using the attached test case and have encountered no
problems at all.

Can you tell me what version of CLI you are using?  Is it built from
CVS or is it the 1.0 release?

Cheers,
-John K

On Thursday, Dec 5, 2002, at 17:06 Europe/Dublin, Mike Luo wrote:

> I've encounted two problems with CLI:
>
> 1. option with argument cannot be placed in the end of the command  
> line. For
> example,
>
>     cli -buildfile connect.xml -debug -emacs -help -logger  
> com.ph.log.Log
>
>     Exception in thread "main"
> org.apache.commons.cli.MissingArgumentException: no argument for:logger
>         at org.apache.commons.cli.Parser.processArgs(Parser.java:239)
>         at org.apache.commons.cli.Parser.processOption(Parser.java:277)
>         at org.apache.commons.cli.Parser.parse(Parser.java:170)
>         at org.apache.commons.cli.Parser.parse(Parser.java:114)
>         at com.ph.econnection.command.console.Cli.main(Cli.java:158)
>
> 2. the trailing arguments are not retrievable by  
> CommandLine.getArgs(). For
> example,
>
>    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.
>
> -Mike
>
>  <<Cli.java>>
>
> *********************************************************************** 
> **
> 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
> copies.
> *********************************************************************** 
> **
> <Cli.java>--
> To unsubscribe, e-mail:    
> <mailto:commons-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:  
> <mailto:commons-user-help@jakarta.apache.org>
- - - - - - - - - - - - - - - - - - - - - - -
Jakarta Commons CLI
http://jakarta.apache.org/commons/cli


Mime
View raw message