cmdarray - array containing the command to call and its arguments. envp - array of strings, each element of which has environment variable settings in the format name=value, or null if the subprocess should inherit the environment of the current process. dir - the working directory of the subprocess, or null if the subprocess should inherit the working directory of the current process.
Originally posted by Tony Docherty: The first parameter is a command and a list of arguments the command takes so unfortunately no you can't pass multiple commands in.[/QB]
Not really true. One can use Runtime.exec() to invoke cmd.exe on Windows (or sh on Linux/Unix) and then pass the commands a line at a time though the process stdin stream.