Example
protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws IOException {
Process process = Runtime.getRuntime().exec("dir /s");
try {
int exit = process.waitFor();
}
catch (InterruptedException exc) {
// ...
}
}
Solution
If parallelism is required, use pooled threads instead of processes.