OutputBuffer stdout = new OutputBuffer(p);
ErrorBuffer stderr = new ErrorBuffer(p);
ExitBuffer exitcode = new ExitBuffer(p);
stdout.waitFor();
stderr.waitFor();
exitcode.waitFor();
if (exitcode.getExitValue().intValue() != 0) {
System.out.write(stderr.getStderr());
System.out.write(stdout.getStdout());