This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes IDEs, Version Control and other tools and the fly likes Problem running .bat script within ant in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Problem running .bat script within ant in Eclipse" Watch "Problem running .bat script within ant in Eclipse" New topic
Author

Problem running .bat script within ant in Eclipse

Eric Fletcher
Ranch Hand

Joined: Oct 26, 2000
Posts: 188
Greetings all,
I'm having an ant-related issue in Eclipse. As part of our build process, we run a .bat file that does some setup via the ant exec task. When I run the build from the command line, no problem, the batch file executes without fail. But when I run the build as an external builder in Eclipse, I get an IOException on the exec task and the build fails with the message "debug error = 2".
I did a quick google search and found a few similar issues but nothing matching this problem exactly. The consensus I found was that "error = 2" meant that the executable in question needs to be in my PATH, but I'm dubious that is my problem since the build runs fine from the command line.
Has anyone seen this behavior from ant/Eclipse before, and might have a resolution? I'm running Eclipse 2.1 and ant 1.5.
Thanks in advance,
E
[ February 19, 2004: Message edited by: Eric Fletcher ]

My theory of evolution is that Darwin was adopted. - Steven Wright
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem running .bat script within ant in Eclipse