Class ExecuteCommand


  • public class ExecuteCommand
    extends Object
    This class executes a given script/commnand using Runtime.exec().
    • Field Detail

      • JAVA_HOME

        public static String JAVA_HOME
      • CLASSPATH

        public static String CLASSPATH
    • Constructor Detail

      • ExecuteCommand

        public ExecuteCommand()
    • Method Detail

      • executeCommand

        public static int executeCommand​(String[] commandArray,
                                         String[] environment,
                                         StringBuffer resultBuffer)
        Method executeCommand
        Parameters:
        commandArray - the command and its arguments to execute
        environment - the environment variable settings for the command
        resultBuffer - the buffer that receives the command output
        Returns:
        the exit status code returned by the executed command