批处理笔记 a.bat打开:c:cd C:\Program Files\Java (进入指定目录下)dir (执行命令)pause(或者cmd,执行完后DOS窗口不退出)java中调用批处理文件public static void main(String[] args) throws Exception{ Runtime run = Runtime.getRuntime(); run.exec("D:\\test.bat");}