Originally published at
simes dot org. You can comment here or
there.
Change working directory of java code to location of batch file before code is launched, call rt.exec("batchfile.bat"), batch file runs.
Leave working directory alone, call
File dir = new File("C:\\path\\to\\batch\\file");
rt.exec("batchfile.bat", null, dir);
Batch file does not
(
Read more... )