From the exact same page: waitFor public abstract int waitFor() throws InterruptedExceptioncauses the current thread to wait, if necessary, until the process represented by this Process object has terminated. This method returns immediately if the subprocess has already terminated. If the subprocess has not yet terminated, the calling thread will be blocked until the subprocess exits. Returns: the exit value of ...