Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 15967 invoked by uid 98); 21 Jan 2003 09:50:25 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 15432 invoked from network); 21 Jan 2003 09:50:21 -0000 Received: from unknown (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 21 Jan 2003 09:50:21 -0000 Received: (qmail 19994 invoked by uid 500); 21 Jan 2003 09:48:45 -0000 Received: (qmail 19985 invoked from network); 21 Jan 2003 09:48:45 -0000 Received: from a17-250-248-97.apple.com (HELO smtpout.mac.com) (17.250.248.97) by 208.185.179.12.available.above.net with SMTP; 21 Jan 2003 09:48:45 -0000 Received: from asmtp02.mac.com (asmtp02-qfe3 [10.13.10.66]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id h0L9mwFF013016 for ; Tue, 21 Jan 2003 01:48:58 -0800 (PST) Received: from mac.com ([213.86.208.6]) by asmtp02.mac.com (Netscape Messaging Server 4.15) with ESMTP id H925XL00.F3B for ; Tue, 21 Jan 2003 01:48:57 -0800 Date: Tue, 21 Jan 2003 09:50:07 +0000 Subject: Re: CLI: Best way to parse multiple arguments of same type? Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v548) From: John Keyes To: "Jakarta Commons Users List" Content-Transfer-Encoding: 7bit In-Reply-To: <10291.203.98.49.151.1043113405.squirrel@webmail.levity.co.nz> Message-Id: X-Mailer: Apple Mail (2.548) X-Spam-Rating: 208.185.179.12.available.above.net 1.6.2 0/1000/N Hi Willie, > public static void main(String[] args) { > Options options = new Options(); > Option run = OptionBuilder.hasArg() > .withArgName("files") > .withValueSeparator() > .withDescription("Run a process") > .create("run"); > //NOTE: How can I change the above to get desired outcome??? Change hasArg() to hasArgs() and that should do the trick. You should log a bug in bugzilla against the documentation so I will pick up on it at a later stage. Thanks, -John K - - - - - - - - - - - - - - - - - - - - - - - Jakarta Commons CLI http://jakarta.apache.org/commons/cli