| Author |
Executing batch file from ANT
|
v jain
Greenhorn
Joined: Jun 16, 2004
Posts: 4
|
|
hi, I am relatively new to ANT. I am trying to run a batch file using ANT's exec tag. But it is generating an Error 2 while executing the command. Can anybody tell me the process to execute a batch file. Its urgent...
|
 |
Manish Hatwalne
Ranch Hand
Joined: Sep 22, 2001
Posts: 2559
|
|
I think you need to execute command shell (comd, commnad??) first using exec task and then pass name of the batch file as its argument. HTH, - Manish
|
 |
v jain
Greenhorn
Joined: Jun 16, 2004
Posts: 4
|
|
I have tried using <exec executable="cmd"> <arg file="${tomcat_bin}/shutdown.bat"/> </exec> It executes a command prompt but doesn't execute this argument... Actually I have to Start and Stop the server evertime the build finishes and starts..
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50675
|
|
"javalearner", We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks! bear Forum Bartender
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
HanMing Low
Ranch Hand
Joined: Oct 18, 2001
Posts: 196
|
|
Hi, Try Hope this helps. Cheers. Han Ming
|
 |
 |
|
|
subject: Executing batch file from ANT
|
|
|