Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 37610 invoked from network); 18 Jul 2008 13:03:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 13:03:30 -0000 Received: (qmail 60219 invoked by uid 500); 18 Jul 2008 13:03:28 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 60136 invoked by uid 500); 18 Jul 2008 13:03:27 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 60125 invoked by uid 99); 18 Jul 2008 13:03:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 06:03:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sebbaz@gmail.com designates 209.85.128.190 as permitted sender) Received: from [209.85.128.190] (HELO fk-out-0910.google.com) (209.85.128.190) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 13:02:34 +0000 Received: by fk-out-0910.google.com with SMTP id 18so326810fkq.10 for ; Fri, 18 Jul 2008 06:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=4JnYYbfxIZF1bjzGjGfungs1fB5/qaOGdbEf3scvbE0=; b=dhK8pXfQJoDvaca5spa4y7tTDZ/+vzSY0iQVSgGAjVguKLhiQ5o40ZBYpwHwL3aVxI 10pUXYF46AipE0kQpMkJvdZNmiMGU3s2ufdjgmULBHiGuDrtMfpGGaAuAOaP06iLD8jV aWdC1tJMTVDerQiLtniBNHzUNbiZskz16C7rU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=bQ55x2jG6/4fLNYdXA8KL28HKdbr80rkBpgAAh9UnjEnSpf2xGvA+RpooDJk6P/CqU SxAPlHvf6wz0Zx3iRyOWLR6grHKgOzvdSjnxOGVRtf8FyydKY4ndxpeefw+GWxH96WLW L2x6h+DKvFODyUjLgLkN+atUTmCRLdJYp75A4= Received: by 10.86.52.1 with SMTP id z1mr276446fgz.65.1216386178054; Fri, 18 Jul 2008 06:02:58 -0700 (PDT) Received: by 10.86.62.18 with HTTP; Fri, 18 Jul 2008 06:02:57 -0700 (PDT) Message-ID: <25aac9fc0807180602w2229866eme5cffb3d634fc03f@mail.gmail.com> Date: Fri, 18 Jul 2008 14:02:57 +0100 From: sebb To: "Commons Developers List" , siegfried.goeschl@it20one.at Subject: Re: [EXEC] Suggestion for CommandLine In-Reply-To: <488090FD.2090008@it20one.at> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <775474270.111216374440980.JavaMail.root@starjar> <488090FD.2090008@it20one.at> X-Virus-Checked: Checked by ClamAV on apache.org On 18/07/2008, Siegfried Goeschl wrote: > Hi Peter, > > that 's a good idea - I will do that. > > Regarding varargs - they are not suppported with JDK 1.3/1.4 as far as I > know > But one could add a String array... > Cheers, > > Siegfried Goeschl > > > Peter Henderson wrote: > > > Hi > > > > I hope this is the correct place for suggestions to Commons Exec. > > > > > > CommandLine > > > > Many command line arguments come in pairs, at the moment I have to call > addArgument() twice for each > > component in the paired argument, which is slightly messy + could lead to > problems if one of the > > pair is commented out later. > > > > Suggestion > > Add a 2 arg addArgument method for adding 2 command line arguments in one. > > (or perhaps use varargs?) > > > > > > example :- > > Before > > CommandLine userAddCL = new CommandLine("useradd"); > > userAddCL.addArgument("-g"); > > userAddCL.addArgument("tomcat"); > > userAddCL.addArgument(username); > > > > After > > CommandLine userAddCL = new CommandLine("useradd"); > > userAddCL.addArgument("-g", "tomcat"); > > userAddCL.addArgument(username); > > > > > > > > > > Peter Henderson. > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > dev-unsubscribe@commons.apache.org > > For additional commands, e-mail: dev-help@commons.apache.org > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org