I have a set of commands that i am executing through java. I stored them in .bat file and then executing through java. When i run bat file through command prompt it executes but when i execute it through java, only 1-2 commands execute and program exits. Please suggest me the solution for this.
Please suggest me the jar file too if any other command referenced
Code:
public static String cmdExec(String cmd) throws IOException {
Process p = Runtime.getRuntime().exec(cmd);
}