当前位置 : 主页 > 编程语言 > c++ >

java执行bat代码.txt

来源:互联网 收集:自由互联 发布时间:2021-07-03
java执行bat代码.txt 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(IO
java执行bat代码.txt
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();
    }
}
上一篇:QRCodeGenerator.java
下一篇:TokenUtil
网友评论