Oldie but goodie. Implement it according to this: When Runtime.exec() won't - JavaWorld