String command = "taskkill /f /im WINWORD.exe";
Runtime.getRuntime().exec(command);
WINWORD.exe 为进程号,这里是office的word的进程
/f /im 为 taskkill的参数
String command = "taskkill /f /im WINWORD.exe";
Runtime.getRuntime().exec(command);
WINWORD.exe 为进程号,这里是office的word的进程
/f /im 为 taskkill的参数