- try {
- String command = task.getCommand(encodingOptions);
-
- if (task.doUseTerminal()) {
- command = "xterm -e '" + command + "'";
- }
-
- System.out.println("Executing command: " + command);
-
- final Runtime run = Runtime.getRuntime();
- Process pr;
- pr = run.exec(new String[] { "/bin/bash", "-c", command });
-
- pr.waitFor();
-
- } catch (final Exception e) {
- System.out.println(e.toString());
- e.printStackTrace();
- }
-
- }