> From: Dave Pawson [mailto:[EMAIL PROTECTED] > Sent: Friday, April 11, 2008 7:35 AM > To: Ant Users List > Subject: Re: arg and jvmarg > > On 11/04/2008, Rick Genter <[EMAIL PROTECTED]> wrote: > > > From: Dave Pawson [mailto:[EMAIL PROTECTED] > > > Sent: Friday, April 11, 2008 1:02 AM > > > To: Ant Users List > > > Subject: Re: arg and jvmarg > > > > > > > > Thanks Joe. I can see the logic, although 'line=' seems to > > > make more sense from > > > a user view? "-o filename" > > > > > > 'line=' doesn't work if any of your arguments contain spaces, since > > internally 'line=' breaks the arguments on whitespace boundaries. > > I seem to have found just the opposite? > line="-o filename" works fine, but as was pointed out, > if I want to use value I have to use two arg elements?
Your example has 2 arguments: '-o' and 'filename'. I recommend reading the documentation for the command line processor you are using for how it processes command lines and what the definition of an 'argument' is. 'line=' won't work if your filename has an embedded space. 'line=' does simple parsing, splitting the arguments on space boundaries. 'line=-o C:\Documents and Settings\user\My Documents\filename.out' generates 5 arguments: -o C:\Documents and Settings\user\My Doucments\filename.out which is almost certainly *NOT* what was wanted. 'value=' explicitly specifies exactly one argument. Specifying <arg value="-o"/> <arg value="C:\Documents and Settings\user\My Documents\filename.out"/> will behave as expected. -- Rick Genter Principal Software Engineer Silverlink Communications [EMAIL PROTECTED] www.silverlink.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]