ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: Empty arguments on the command-line under windows
Date Sun, 04 Sep 2005 21:43:32 GMT
Martin Senger wrote:
> Hi,
> 
>>If you run ANT in verbose mode (-v) what does it
>>output as the string that is generated...?
>>
> 
>    This is how it look underw windows:
> 
> [testing] Executing 'C:\Program Files\Java\jre1.5.0_04\bin\java.exe' with arguments:
>   [testing] '-classpath'
>   [testing] 'C:\Documents and settings\martin\....jar'
>   [testing] 'TestArgs'
>   [testing] '-cacheDir'
>   [testing] ''
>   [testing] '-dt'
>   [testing] 
>   [testing] The ' characters around the executable and arguments are
>   [testing] not part of the command.
>   [testing] 0: -cacheDir
>   [testing] 1: -dt
> 
>    And this is how it looks under linux:
> 
> [testing] Executing '/usr/local/j2sdk1.4.2_08/jre/bin/java' with
> arguments:
>   [testing] '-classpath'
>   [testing] '/home/senger/....jar'
>   [testing] 'TestArgs'
>   [testing] '-cacheDir'
>   [testing] ''
>   [testing] '-dt'
>   [testing]
>   [testing] The ' characters around the executable and arguments are
>   [testing] not part of the command.
>   [testing] 0: -cacheDir
>   [testing] 1:
>   [testing] 2: -dt
> 
> 
>    And this is the Ant task (I have already posted this in my previous
> email, sorry for the repetition):
> 
>      <property name="my.property" value=""/>
> 
>      <java classname="TestArgs" taskname="testing"
>        classpathref="build.classpath" fork="true" failonerror="true">
>        <arg value="-cacheDir"/>
>        <arg value="${my.property}"/>
>        <arg value="-dt"/>
>      </java>
> 
>    So my (sad) conclusion is that I must write my build.xml conditionally
> for various OS's. That's also what Antoine suggested:

I dont see any difference between the list of args passed in to java.exe 
on either platform -only what got picked up at the far end. Which makes 
me wonder what java.exe is up to.


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


Mime
View raw message