commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tino Schöllhorn <t.schoellh...@plattform-gmbh.de>
Subject Re: [EXEC] Quoting of arguments
Date Thu, 24 Apr 2008 10:24:23 GMT
Hi,

I found a method how to resolve that issue. Perhaps it would make sense 
to include a CommandLine.parse(String line, boolean handleQuotes) method 
as well.

Cheers
Tino

Tino Schöllhorn schrieb:
> Hi,
> 
> I am trying to switch to commons-exec. Now I found the following issue: 
> We have small commandline-wrapper around "ImageMagick". So we have a 
> commandline which is something like:
> 
> cmd /C convert ${in} -resize "500x>" ${out}
> 
> When using that command with a "simple" Process without parsing etc the 
> command executes fine. But when using EXEC with CommandLine.parse there 
> is an error as EXEC is discarding the quotes (").
> 
> When I debug the corresponding CommandLine-Object I get the arguments 
> like that:
> 
> cmd
> /c
> convert
> ${in}
> -resize
> 500x>
> ${out}
> 
> ImageMagick needs those quotes on our target platforms (Windows and 
> Linux). So is there a way to protect those quotes?
> 
> Cheers,
> Tino


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


Mime
View raw message