class ProcessLauncherImpl implements ProcessLauncher {

  @Override
  public Process launch(String program, List<String> args) throws IOException {
    List<String> arguments = new ArrayList<>();
    arguments.add(program);
    arguments.addAll(args);

    ProcessBuilder processBuilder =
        new ProcessBuilder()
            .command(arguments)
            .redirectErrorStream(true)
            .redirectOutput(Redirect.PIPE);

    return processBuilder.start();
  }

}