Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Is it possible to kill a process based on process name using java in Windows? The process is not a java process. It is an exe.
尝试
Runtime.getRuntime().exec("taskkill /F /IM <processname>.exe")
Runtime.getRuntime().exec("taskkill /F /IM explorer.exe /T");
/F
/IM
/T