Java tutorial
//package com.java2s; public class Main { static boolean isProcessCompleted(Process process) { try { if (process == null) return true; process.exitValue(); return true; } catch (IllegalThreadStateException e) { // do nothing } return false; } }