public synchronized void start() throws IOException {
    Preconditions.checkState(mProcess == null, "Process is already running");
    String java = PathUtils.concatPath(System.getProperty("java.home"), "bin", "java");
    String classpath = System.getProperty("java.class.path");
    List<String> args = new ArrayList<>(Arrays.asList(java, "-cp", classpath));
    for (Entry<PropertyKey, String> entry : mConf.entrySet()) {
      args.add(String.format("-D%s=%s", entry.getKey().toString(), entry.getValue()));
    }
    args.add(mClazz.getCanonicalName());
    ProcessBuilder pb = new ProcessBuilder(args);
    pb.redirectError(mOutFile);
    pb.redirectOutput(mOutFile);
    mProcess = pb.start();
  }
public synchronized void start ( ) throws IOException { Preconditions . checkState ( mProcess == null , "Process is already running" ) ; String java = PathUtils . concatPath ( System . getProperty ( "java.home" ) , "bin" , "java" ) ; String classpath = System . getProperty ( "java.class.path" ) ; List < String > args = new ArrayList < > ( Arrays . asList ( java , "-cp" , classpath ) ) ; for ( Entry < PropertyKey , String > entry : mConf . entrySet ( ) ) { args . add ( String . format ( "-D%s=%s" , entry . getKey ( ) . toString ( ) , entry . getValue ( ) ) ) ; } args . add ( mClazz . getCanonicalName ( ) ) ; ProcessBuilder pb = new ProcessBuilder ( args ) ; pb . redirectError ( mOutFile ) ; pb . redirectOutput ( mOutFile ) ; mProcess = pb . start ( ) ; }
Starts the process.