Java tutorial
//package com.java2s; public class Main { /** * Check if a process is still alive. */ public static boolean isProcessAlive(Process process) { try { process.exitValue(); return false; } catch (IllegalThreadStateException e) { return true; } } }