question: public static Process createAndStartProcessIntern ( File log , String target , String ... args ) throws IOException { ProcessBuilder pb = new ProcessBuilder ( args ) ; pb . directory ( new File ( target ) ) ; EnvironmentVariableUtils . inheritNodeJsPathEnvVariableUtils ( pb ) ; pb . redirectErrorStream ( true ) ; pb . redirectOutput ( Redirect . to ( log ) ) ; Process p = pb . start ( ) ; assert pb . redirectInput ( ) == Redirect . PIPE ; assert pb . redirectOutput ( ) . file ( ) == log ; assert p . getInputStream ( ) . read ( ) == - 1 ; return p ; }
target:  Helper to create any Process based on args and redirecting output to log. The process is started in the TARGET-folder.