public void runCommond(String cmd, String dir)
throws InterruptedException, IOException {
Runtime run = Runtime.getRuntime();
Process process = run.exec("cmd /c " + cmd, null, new File(dir));
process.waitFor();
process.destroy();
}
//删除SVNTemp目录下history和recent文件夹及子项
runCommond("del /q history,recent", "D:\\SVNTemp\\");
java运行调用命令或运行其他程序
最新推荐文章于 2022-01-20 13:48:00 发布