I am trying to execute a .bat file through ANT. The contents of the .bat file are as follows: cd \oc4j\j2ee\home java -jar admin.jar ormi://localhost admin admin -shutdown
I am using the exec task of ant as follows: exec executable="C:\ocj4\j2ee\home\stoporion.bat" (I have left out the brackets!). I am getting the following error: file:C:/ant/apache-ant-1.5.3-1/bin/build.xml:61: Execute failed: java.io.IOExcep tion: CreateProcess: C:\ocj4\j2ee\home\stoporion.bat error=3 Does anyone know how to execute a .bat file on its own. I don't need to pass arguments or anything like that. I just want to have the contents of the .bat file executed itself? Thanks again for any help!
posted 13 years ago
Twigged it eventually. Now using: exec dir="C:\oc4j\j2ee\home" executable="C:\oc4j\j2ee\home\stoporion.bat" [ April 25, 2003: Message edited by: L Brennan ]