String[] cmd = new String[4];
cmd[0]= "cmd.exe";
cmd[1] = "/C";
cmd[2] = "D:";
cmd[3] = "dir";
Process process = Runtime.getRuntime().exec(cmd);
BufferedReader stdInput = new BufferedReader(new InputStreamReader(process.getInputStream()));
String s = "";
while (( s = stdInput.readLine()) != null) {
System.out.println(s);
}
Actully my default when i type cmd in command center it id pointing to c:\\DocumentsAndSetting\\paul
but i want change it to d:\\
in command prompt if i type d:
it changes,
but not able to do it using getRuntime().exec()
pls provide some help
