public static Expect4j spawn(String cmdArgs[], String[] envParams) throws Exception {
        Process process = Runtime.getRuntime().exec(cmdArgs, envParams);
        Expect4j expect = new Expect4j(process);
        return expect;
    }
public static Expect4j spawn ( String cmdArgs [ ] , String [ ] envParams ) throws Exception { Process process = Runtime . getRuntime ( ) . exec ( cmdArgs , envParams ) ; Expect4j expect = new Expect4j ( process ) ; return expect ; }
Spawns a local process with the input/output streams controlled
via Expect4J.  The command line arguments are provided in a
pre-split manner.

@param cmdArgs array containing the command to call and its
arguments.
@param envParams array of strings, each element of which has
environment variable settings in the format
<i>name=value</i>, or {@code null} if the
subprocess should inherit the environment of the
current process.
@return the controlling Expect4j instance
@see Runtime#exec(String[], String[])