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();
    }
}       

相关文章:

  • 2021-12-08
  • 2022-01-10
  • 2022-12-23
  • 2021-07-23
  • 2021-12-15
  • 2021-08-02
  • 2021-11-03
  • 2021-09-15
猜你喜欢
  • 2021-08-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2021-05-14
  • 2021-06-02
相关资源
相似解决方案