public static Process runCommand ( List < String > toRun ) throws OSHelperException { Process proc ; ProcessBuilder procBuilder = new ProcessBuilder ( ) ; procBuilder . command ( toRun ) ; try { proc = procBuilder . start ( ) ; } catch ( IOException ex ) { throw new OSHelperException ( "Received an IOException when running command:\n" + toRun + "\n" + ex . getMessage ( ) , ex ) ; } return proc ; }
Runs a new OS process