public static int executeCommand ( final Logger logger , final String [ ] command , final File workingDir , final Map < String , String > environmentVars , final String applicationName , final String scopedInstancePath ) throws IOException , InterruptedException { ExecutionResult result = executeCommandWithResult ( logger , command , workingDir , environmentVars , applicationName , scopedInstancePath ) ; if ( ! Utils . isEmptyOrWhitespaces ( result . getNormalOutput ( ) ) ) logger . fine ( result . getNormalOutput ( ) ) ; if ( ! Utils . isEmptyOrWhitespaces ( result . getErrorOutput ( ) ) ) logger . warning ( result . getErrorOutput ( ) ) ; return result . getExitValue ( ) ; }
Executes a command on the VM and logs the output .