I want to run a batch file through JAVA. Then after it finishes running 1st batch file my program should run second batch file. How to know the status of the first batch file whether it finishes its task or not?
Use ProcessBuilder and examine the return value of the execution.
There are plenty of examples on the web of using that class and the java docs have a simple example also