You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by lawrence casella <la...@printmediaalliance.com> on 2003/08/06 15:27:36 UTC

CLI HelpFormatter

I have looked in the source code and elsewhere but, with respect to the
HelpFormatter.printHelp(java.lang.String cmdLineSyntax, Options options), I
cannot figure out what the cmdLineSyntax parameter is supposed to be.  I
noticed that it throws an exception if one is not included.

Thanks,

LJC



Re: CLI HelpFormatter

Posted by Rob Oxspring <ro...@imapmail.org>.
I haven't looked at the 1.0 code for a while but IIRC the cmdLineSyntax allows you to supply the beginning of the command line that isn't dependant on the options.  For example the following usage line can be split into the section independant of options "java -jar myapp.jar" and a section generated from the options "[-?] [--username name]":

java -jar myapp.jar [-?] [--username name]

Basically the cmdLineSyntax section should be anything typed in at the commandline before option processing kicks in.

Hope that helps,

Rob

----- Original Message ----- 
From: "lawrence casella" <la...@printmediaalliance.com>
To: <co...@jakarta.apache.org>
Sent: Wednesday, August 06, 2003 2:27 PM
Subject: CLI HelpFormatter


> I have looked in the source code and elsewhere but, with respect to the
> HelpFormatter.printHelp(java.lang.String cmdLineSyntax, Options options), I
> cannot figure out what the cmdLineSyntax parameter is supposed to be.  I
> noticed that it throws an exception if one is not included.
> 
> Thanks,
> 
> LJC
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: CLI HelpFormatter

Posted by Rob Oxspring <ro...@imapmail.org>.
I haven't looked at the 1.0 code for a while but IIRC the cmdLineSyntax allows you to supply the beginning of the command line that isn't dependant on the options.  For example the following usage line can be split into the section independant of options "java -jar myapp.jar" and a section generated from the options "[-?] [--username name]":

java -jar myapp.jar [-?] [--username name]

Basically the cmdLineSyntax section should be anything typed in at the commandline before option processing kicks in.

Hope that helps,

Rob

----- Original Message ----- 
From: "lawrence casella" <la...@printmediaalliance.com>
To: <co...@jakarta.apache.org>
Sent: Wednesday, August 06, 2003 2:27 PM
Subject: CLI HelpFormatter


> I have looked in the source code and elsewhere but, with respect to the
> HelpFormatter.printHelp(java.lang.String cmdLineSyntax, Options options), I
> cannot figure out what the cmdLineSyntax parameter is supposed to be.  I
> noticed that it throws an exception if one is not included.
> 
> Thanks,
> 
> LJC
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 
>