I use the following code to execute a batch file:
java.lang.Runtime rt = java.lang.Runtime.getRuntime();
Process pr = rt.exec("MyBatch.bat");
My batch file takes some time to execute. I want my servlet process to wait for the batch file to complete. I would like to close the command line after executing the batch file. How can i do this?
source
share