В качестве обходного пути я создал простую программу-оболочку Java, которая выполняет команду, заданную в качестве аргументов. Это позволяет использовать конфигурацию запуска Eclipse Java вместо внешнего инструмента.
public class Exec {
private final Process process;
private boolean error;
public Exec(Process process) {
this.process = process;
}
public static void main(String[] command) throws Exception {
new Exec(Runtime.getRuntime().exec(command)).run();
}
public void run() throws Exception {
Thread thread = new Thread(() -> copy(process.getInputStream(), System.out));
thread.start();
copy(process.getErrorStream(), System.err);
int status = process.waitFor();
thread.join();
System.err.flush();
System.out.flush();
System.exit(status != 0 ? status : error ? 1 : 0);
}
private void copy(InputStream in, OutputStream out) {
try {
byte[] buffer = new byte[4096];
for (int count; (count = in.read(buffer)) > 0;) {
out.write(buffer, 0, count);
}
} catch (IOException e) {
error = true;
e.printStackTrace();
}
}
}