Process control in Java