I have a synchronization problem in java. I want my main thread to wait until process "p1" is finished. I have used "waitfor" method. it has not worked for me.
Process p1 = runtime.exec("cmd /c start /MIN " + path + "aBatchFile.bat" );
p1.waitFor();
Could anybody help me please?
Thank you so much.