code: public ProgramResponse invokeProgram(int timeout, String directory, String command,
                                           String... arguments) {
          ProgramResponse result = new ProgramResponse();
          result.setDirectory(directory);
          result.setCommand(command);
          result.setArguments(arguments);
          invokeProgram(timeout, result);
          return result;
      }
docs: Invokes an external program, waits for it to complete,
  and returns the result.
  @param timeout maximum time (in milliseconds) to wait.
  @param directory working directory for program
  (may be null if not important).
  @param command program to start.
  @param arguments arguments for program.
  @return response from program.