static Process runClient(List<String> command, 
                           Map<String, String> env) throws IOException {
    ProcessBuilder builder = new ProcessBuilder(command);
    if (env != null) {
      builder.environment().putAll(env);
    }
    Process result = builder.start();
    return result;
  }
static Process runClient ( List < String > command , Map < String , String > env ) throws IOException { ProcessBuilder builder = new ProcessBuilder ( command ) ; if ( env != null ) { builder . environment ( ) . putAll ( env ) ; } Process result = builder . start ( ) ; return result ; }
Run a given command in a subprocess, including threads to copy its stdout
and stderr to our stdout and stderr.
@param command the command and its arguments
@param env the environment to run the process in
@return a handle on the process
@throws IOException