Java tutorial
//package com.java2s; import java.util.concurrent.Callable; public class Main { private static Callable<Integer> createWaitForCallable(final Process startedProcess) { Callable<Integer> waitForCallable = new Callable<Integer>() { @Override public Integer call() throws Exception { return startedProcess.waitFor(); } }; return waitForCallable; } }