验证中...
Languages: Java
Latest update 2019-01-22 07:20
java执行bat代码.txt
Raw Copy
public static void runbat(String path,String filename) {
String cmd = "cmd /c start"+path+"/"+filename;
//String cmd = "cmd /c start F:/mysqlbackup/guohua/backup.bat";
try {
Runtime.getRuntime().exec(cmd);
} catch(IOException ioe) {
ioe.printStackTrace();
}
}

Comment list( 1 )

martin 2017-07-10 19:16

涨姿势了

You need to Sign in for post a comment

Help Search