I have this code:
我有这段代码:
File file = new File(path + "\RunFromCode.bat");
file.createNewFile();
PrintWriter writer = new PrintWriter(file, "UTF-8");
for (int i = 0; i <= MAX; i++) {
writer.println("@cd " + i);
writer.println(NATIVE SYSTEM COMMANDS);
// more things
}
writer.close();
Process p = Runtime.getRuntime().exec("cmd /c start " + path + "\RunFromCode.bat");
p.waitFor();
file.delete();
File file = new F