How do I change the starting directory for running a command with ProcessBuilder?
Created May 8, 2012
John Zukowski Use the directory() method of ProcessBuilder to change the starting / working directory. Once setting the directory, start() the sub-process.
ProcessBuilder processBuilder = new ProcessBuilder( command, arg1, arg2); processBuilder.directory("DirectoryLocation"); Process p = processBuilder.start();