/* Let StreamGobbler handle output */
StreamGobbler outputGobbler = new StreamGobbler(proc.getInputStream());
/* Flush both error and output streams */
errorGobbler.schedule();
outputGobbler.schedule();
/* Wait for the process to terminate */
proc.waitFor();
} catch (IOException e) {
Activator.safeLogError(e.getMessage(), e);