code: public void setWorkingDirectory(File dir) {
          if (!dir.exists()) {
              throw new IllegalArgumentException(dir + " doesn't exist.");
          }
          pb.directory(dir);
      }
docs: Set the working directory where the process get executed.
  
  @param dir the directory in which the executable will be started