You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Thompson, Greg D. (LNG-DFW)" <gr...@lexisnexis.com> on 2009/12/21 20:57:53 UTC

Windows 7 and ant exec task

I'm using Windows 7.  When I use the ant exec task, I get 
 
Cannot run program "zzz": CreateProcess error=2, The system cannot find
the file specified.
 
When I run the program "zzz" from the command line, it works fine.  The
folder that program "zzz" is in is in my path env variable.
 
Ant version 1.7.1
 
Java version 1.6.
 
Has anyone experienced this problem?  I did several google searches and
found nothing.
 
This works fine in XP and Windows Server 2003.
 
Thanks.



-----------------------------------------
The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

RE: Windows 7 and ant exec task

Posted by Alec Fernandez <Al...@sas.com>.
Something else to consider is if the file is in one of the areas that´s protected by UAC (like Program Files) it may not be where you think it is.  It might be in your windows virtual store... so java looks for it in Program Files/mysoftware but does not find it there because in reality it resides in \Users\myuserid\AppData\Local\Virtualstore\Program Files\mysoftware...

You might try logging in as a different user and seeing where the file truly resides.

>> -----Original Message-----
>> From: Thompson, Greg D. (LNG-DFW)
>> [mailto:greg.thompson@lexisnexis.com]
>> Sent: Tuesday, December 22, 2009 3:13 PM
>> To: Ant Users List
>> Subject: RE: Windows 7 and ant exec task
>> 
>> The .bat file works fine on Server 2003 and XP.  It doesn't work on
>> Windows 7.
>> 
>> Thanks,
>> Greg
>> -----Original Message-----
>> From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]
>> Sent: Tuesday, December 22, 2009 8:03 AM
>> To: user@ant.apache.org
>> Subject: AW: Windows 7 and ant exec task
>> 
>> BAT files are not native executables. Execute the shell (cmd) instead
>> with BAT as argument.
>> See the FAQ.
>> 
>> Jan
>> 
>> >-----Ursprüngliche Nachricht-----
>> >Von: Thompson, Greg D. (LNG-DFW)
>> [mailto:greg.thompson@lexisnexis.com]
>> >Gesendet: Dienstag, 22. Dezember 2009 14:39
>> >An: Ant Users List
>> >Betreff: RE: Windows 7 and ant exec task
>> >
>> >Zzz is a .bat file.  If I specify the full path of zzz, it executes
>> >fine.
>> >
>> >I'd rather not use the full path.  The path to the executable will be
>> >different on the dev workstations and the build/ci server.
>> >
>> >Thanks,
>> >Greg
>> >
>> >-----Original Message-----
>> >From: Antoine Levy Lambert [mailto:antoine@gmx.de]
>> >Sent: Monday, December 21, 2009 4:41 PM
>> >To: Ant Users List
>> >Subject: Re: Windows 7 and ant exec task
>> >
>> >Hello Greg,
>> >
>> >what is zzz ? is it an exe ? a shell script (.cmd, .bat) ?
>> >
>> >if you specify the full path of zzz, can you then execute it ?
>> >
>> >Regards,
>> >
>> >Antoine
>> >
>> >Thompson, Greg D. (LNG-DFW) wrote:
>> >> I'm using Windows 7.  When I use the ant exec task, I get
>> >>
>> >> Cannot run program "zzz": CreateProcess error=2, The system cannot
>> >> find the file specified.
>> >>
>> >> When I run the program "zzz" from the command line, it works fine.
>> >> The folder that program "zzz" is in is in my path env variable.
>> >>
>> >> Ant version 1.7.1
>> >>
>> >> Java version 1.6.
>> >>
>> >> Has anyone experienced this problem?  I did several google searches
>> >> and found nothing.
>> >>
>> >> This works fine in XP and Windows Server 2003.
>> >>
>> >> Thanks.
>> >>
>> >>
>> >
>> >
>> >---------------------------------------------------------------------
>> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For
>> additional
>> >commands, e-mail: user-help@ant.apache.org
>> >
>> >
>> >-----------------------------------------
>> >The information contained in this e-mail message is intended only for
>> >the personal and confidential use of the recipient(s) named above.
>> This
>> >message may be an attorney-client communication and/or work product
>> and
>> >as such is privileged and confidential. If the reader of this message
>> >is not the intended recipient or an agent responsible for delivering
>> it
>> >to the intended recipient, you are hereby notified that you have
>> >received this document in error and that any review, dissemination,
>> >distribution, or copying of this message is strictly prohibited. If
>> you
>> >have received this communication in error, please notify us
>> immediately
>> >by e-mail, and delete the original message.
>> >
>> >---------------------------------------------------------------------
>> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For
>> additional
>> >commands, e-mail: user-help@ant.apache.org
>> >
>> >
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
>> commands, e-mail: user-help@ant.apache.org
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>> 


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


RE: Windows 7 and ant exec task

Posted by "Thompson, Greg D. (LNG-DFW)" <gr...@lexisnexis.com>.
The .bat file works fine on Server 2003 and XP.  It doesn't work on Windows 7.   

Thanks,
Greg
-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: Tuesday, December 22, 2009 8:03 AM
To: user@ant.apache.org
Subject: AW: Windows 7 and ant exec task

BAT files are not native executables. Execute the shell (cmd) instead with BAT as argument.
See the FAQ.

Jan 

>-----Ursprüngliche Nachricht-----
>Von: Thompson, Greg D. (LNG-DFW) [mailto:greg.thompson@lexisnexis.com]
>Gesendet: Dienstag, 22. Dezember 2009 14:39
>An: Ant Users List
>Betreff: RE: Windows 7 and ant exec task
>
>Zzz is a .bat file.  If I specify the full path of zzz, it executes 
>fine.
>
>I'd rather not use the full path.  The path to the executable will be 
>different on the dev workstations and the build/ci server.
>
>Thanks,
>Greg
>
>-----Original Message-----
>From: Antoine Levy Lambert [mailto:antoine@gmx.de]
>Sent: Monday, December 21, 2009 4:41 PM
>To: Ant Users List
>Subject: Re: Windows 7 and ant exec task
>
>Hello Greg,
>
>what is zzz ? is it an exe ? a shell script (.cmd, .bat) ?
>
>if you specify the full path of zzz, can you then execute it ?
>
>Regards,
>
>Antoine
>
>Thompson, Greg D. (LNG-DFW) wrote:
>> I'm using Windows 7.  When I use the ant exec task, I get
>>  
>> Cannot run program "zzz": CreateProcess error=2, The system cannot 
>> find the file specified.
>>  
>> When I run the program "zzz" from the command line, it works fine.  
>> The folder that program "zzz" is in is in my path env variable.
>>  
>> Ant version 1.7.1
>>  
>> Java version 1.6.
>>  
>> Has anyone experienced this problem?  I did several google searches 
>> and found nothing.
>>  
>> This works fine in XP and Windows Server 2003.
>>  
>> Thanks.
>>
>>   
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
>commands, e-mail: user-help@ant.apache.org
>
>
>-----------------------------------------
>The information contained in this e-mail message is intended only for 
>the personal and confidential use of the recipient(s) named above. This 
>message may be an attorney-client communication and/or work product and 
>as such is privileged and confidential. If the reader of this message 
>is not the intended recipient or an agent responsible for delivering it 
>to the intended recipient, you are hereby notified that you have 
>received this document in error and that any review, dissemination, 
>distribution, or copying of this message is strictly prohibited. If you 
>have received this communication in error, please notify us immediately 
>by e-mail, and delete the original message.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
>commands, e-mail: user-help@ant.apache.org
>
>

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


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


AW: Windows 7 and ant exec task

Posted by Ja...@rzf.fin-nrw.de.
BAT files are not native executables. Execute the shell (cmd) instead with BAT as argument.
See the FAQ.

Jan 

>-----Ursprüngliche Nachricht-----
>Von: Thompson, Greg D. (LNG-DFW) [mailto:greg.thompson@lexisnexis.com] 
>Gesendet: Dienstag, 22. Dezember 2009 14:39
>An: Ant Users List
>Betreff: RE: Windows 7 and ant exec task
>
>Zzz is a .bat file.  If I specify the full path of zzz, it executes
>fine.
>
>I'd rather not use the full path.  The path to the executable will be
>different on the dev workstations and the build/ci server. 
>
>Thanks,
>Greg
>
>-----Original Message-----
>From: Antoine Levy Lambert [mailto:antoine@gmx.de] 
>Sent: Monday, December 21, 2009 4:41 PM
>To: Ant Users List
>Subject: Re: Windows 7 and ant exec task
>
>Hello Greg,
>
>what is zzz ? is it an exe ? a shell script (.cmd, .bat) ?
>
>if you specify the full path of zzz, can you then execute it ?
>
>Regards,
>
>Antoine
>
>Thompson, Greg D. (LNG-DFW) wrote:
>> I'm using Windows 7.  When I use the ant exec task, I get
>>  
>> Cannot run program "zzz": CreateProcess error=2, The system cannot 
>> find the file specified.
>>  
>> When I run the program "zzz" from the command line, it works fine.  
>> The folder that program "zzz" is in is in my path env variable.
>>  
>> Ant version 1.7.1
>>  
>> Java version 1.6.
>>  
>> Has anyone experienced this problem?  I did several google searches 
>> and found nothing.
>>  
>> This works fine in XP and Windows Server 2003.
>>  
>> Thanks.
>>
>>   
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
>commands, e-mail: user-help@ant.apache.org
>
>
>-----------------------------------------
>The information contained in this e-mail message is intended only
>for the personal and confidential use of the recipient(s) named
>above. This message may be an attorney-client communication and/or
>work product and as such is privileged and confidential. If the
>reader of this message is not the intended recipient or an agent
>responsible for delivering it to the intended recipient, you are
>hereby notified that you have received this document in error and
>that any review, dissemination, distribution, or copying of this
>message is strictly prohibited. If you have received this
>communication in error, please notify us immediately by e-mail, and
>delete the original message.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>

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


RE: Windows 7 and ant exec task

Posted by "Thompson, Greg D. (LNG-DFW)" <gr...@lexisnexis.com>.
Zzz is a .bat file.  If I specify the full path of zzz, it executes
fine.

I'd rather not use the full path.  The path to the executable will be
different on the dev workstations and the build/ci server. 

Thanks,
Greg

-----Original Message-----
From: Antoine Levy Lambert [mailto:antoine@gmx.de] 
Sent: Monday, December 21, 2009 4:41 PM
To: Ant Users List
Subject: Re: Windows 7 and ant exec task

Hello Greg,

what is zzz ? is it an exe ? a shell script (.cmd, .bat) ?

if you specify the full path of zzz, can you then execute it ?

Regards,

Antoine

Thompson, Greg D. (LNG-DFW) wrote:
> I'm using Windows 7.  When I use the ant exec task, I get
>  
> Cannot run program "zzz": CreateProcess error=2, The system cannot 
> find the file specified.
>  
> When I run the program "zzz" from the command line, it works fine.  
> The folder that program "zzz" is in is in my path env variable.
>  
> Ant version 1.7.1
>  
> Java version 1.6.
>  
> Has anyone experienced this problem?  I did several google searches 
> and found nothing.
>  
> This works fine in XP and Windows Server 2003.
>  
> Thanks.
>
>   


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


-----------------------------------------
The information contained in this e-mail message is intended only
for the personal and confidential use of the recipient(s) named
above. This message may be an attorney-client communication and/or
work product and as such is privileged and confidential. If the
reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and
that any review, dissemination, distribution, or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by e-mail, and
delete the original message.

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


Re: Windows 7 and ant exec task

Posted by Antoine Levy Lambert <an...@gmx.de>.
Hello Greg,

what is zzz ? is it an exe ? a shell script (.cmd, .bat) ?

if you specify the full path of zzz, can you then execute it ?

Regards,

Antoine

Thompson, Greg D. (LNG-DFW) wrote:
> I'm using Windows 7.  When I use the ant exec task, I get 
>  
> Cannot run program "zzz": CreateProcess error=2, The system cannot find
> the file specified.
>  
> When I run the program "zzz" from the command line, it works fine.  The
> folder that program "zzz" is in is in my path env variable.
>  
> Ant version 1.7.1
>  
> Java version 1.6.
>  
> Has anyone experienced this problem?  I did several google searches and
> found nothing.
>  
> This works fine in XP and Windows Server 2003.
>  
> Thanks.
>
>   


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