The title basically says it all. What I've been able to do so far, by searching around on the web, is the following:
Runtime rt = Runtime.getRuntime();
try {
Process proc = rt.exec("cmd /c start cmd.exe /K \"cd " + locaction);
}
catch (Exception e) {
//...
}
where location is the String representation of the directory I'd like to switch to. Not sure if the above is the best way to do that, but either way, how do I then run a certain command from that directory (say, e.g., there's an application there and I want it to run)? Thanks.
Runtimeinstance. You should specify the directory as part of the program name.