Nitin Surana wrote:I also had the same problem, long time ago and was unable to solve. Any help is greatly appreciated.
I have done a small work around and its working as of now its not a legal solution
and remove p.waitFor
add small code at the end of the batch file
when work is over batch file executes the exit statement and it will return controll to the program then p.getInputStream().read() will return -1 this will indicate end of execution untill -1 is got the main
thread will wait for process. "This worked for me"
might work for you also