Hi,
I am running an utility from java. The utility is a '.cmd' file. I have used the code below to run the utility.
Runtime runTime = Runtime.getRuntime();
try{
runTime.exec("cmd /c start D:/Test/run.cmd");
}
catch(Exception e){
And it runs the utility successfully, the utility should be run 5 times and that too depends upon the status of the utility , I mean, if the utility runs successfully in the first iteration I have to run the second. Now my problem is : How should i know from the command prompt utility that it has been run successfully or failed in order to run the next iteration. I want to know , if there is any way to read from the Dos prompt window.
Frens this is very urgent task assigned to me.
Help would be greatly appreciated.