protected static boolean runProcess(String[] toolCommandLine) {
		try {
			final Process p = Runtime.getRuntime().exec(toolCommandLine);
			try {
				// Read and display the stdout and stderr outputs. This also
				// prevents deadlock on some systems if the streams are not
				// read.
				StreamReader stdOutReader = new StreamReader(p.getInputStream());
				Thread stdOutReaderThread = new Thread(stdOutReader, toolCommandLine[0] + " stdout reader");
				stdOutReaderThread.setDaemon(true);
				stdOutReaderThread.start();
				StreamReader stdErrReader = new StreamReader(p.getErrorStream());
				Thread stdErrReaderThread = new Thread(stdErrReader, toolCommandLine[0] + " stderr reader");
				stdErrReaderThread.setDaemon(true);
				stdErrReaderThread.start();
				try {
					p.waitFor();
				} finally {
					stdOutReaderThread.interrupt();
					stdErrReaderThread.interrupt();
					stdOutReaderThread.join();
					String stdOut = stdOutReader.toString();
					if (stdOut.length() > 0)
						log.log(Level.INFO, "{0}''s standard output follows:\n{1}", new Object[] { toolCommandLine[0], stdOut });
					stdErrReaderThread.join();
					String stdErr = stdErrReader.toString();
					if (stdErr.length() > 0)
						log.log(Level.WARNING, "{0}''s standard error follows:\n{1}", new Object[] { toolCommandLine[0], stdErr });
				}
			} finally {
				// Work around various resource leaks.
				p.getOutputStream().close();
				p.getErrorStream().close();
				p.getInputStream().close();
				p.destroy();
			}
			boolean normalExit = p.exitValue() == 0;
			if (!normalExit)
				log.log(Level.WARNING, "{0} exited with status {1}", new Object[] { toolCommandLine[0], p.exitValue() });
			return normalExit;
		} catch (final IOException e) {
			log.log(Level.SEVERE, "Cannot launch {0}! Make sure it is installed and appears in your PATH environment variable!", toolCommandLine[0]);
			return false;
		} catch (final InterruptedException e) {
			log.log(Level.WARNING, "Received java.lang.InterruptedException while executing {0}; optimisation is cancelled for the file", toolCommandLine[0]);
			return false;
		}
	}