更新时间:2023-12-03 23:23:28
String [] command = {"cmd" , "/C" ,cmd + " >" + finalPath};
Process p = Runtime.getRuntime().exec(command);
The problem is solved.
cmd : c:/coolroid/gicater/mysqldump.exe -h127.0.0.1 -uXXXX -pXXXX -PXXX XXXX
finalPath: C:/jukebackup/XXXXX_1498793488965.bak