I want to execute a batch file from a java program.
I am using the following command.
Runtime.getRuntime().exec(\"server.bat\");
Bu
The second parameter to exec is a String[] of args for the environment settings (null means inherit the process' current ones) and the third parameter to exec should be a file providing the working directory. Try this:
Runtime.getRuntime().exec("cmd /c server.bat", null, new File("./com/project/util"));