public Process runWithConfirmation ( String id , Class < ? > klass , String [ ] javaArguments , String [ ] processArguments ) throws IOException , InterruptedException { Process process = startProcess ( id , klass , javaArguments , processArguments , true ) ; waitConfirmation ( klass . getSimpleName ( ) , process ) ; new StreamRedirector ( process . getInputStream ( ) , klass . getSimpleName ( ) + PROCESS_STDOUT_STREAM_PREFIX , redirectProcessInputStreamToParentProcessStdOut ) . start ( ) ; return process ; }
Runs process based on a specified class in a separate VM using array of arguments . To confirm that process completes startup it should write a startup completed string into it s standard output .