[args4j-users] Re: required arguments
Brought to you by:
kkawa
From: Kohsuke K. <Koh...@Su...> - 2006-02-20 18:44:00
|
> Is there any way to mark an argument as required > and prevent the null check: > > ... > StringOption paramUserName = new StringOption("-u"); > cmdLineParser.addOption(paramUserName); > String user = paramUserName.value; > if (user == null) { > printUsage(); > } Since then args4j has moved to https://args4j.dev.java.net/ and yes, a mandatory option can be easily declared. See https://args4j.dev.java.net/nonav/maven/apidocs/index.html?org/kohsuke/args4j/Option.html -- Kohsuke Kawaguchi Sun Microsystems koh...@su... |