Stop a java process in windows

Well this came up when I needed to stop a java process from jenkins. Instead of hacking your way to renamn the java process you can name the window and kill the process that way.
To name the process start it with start "myprocess" java -jar whatever.jar then to kill it taskkill /F /FI "WindowTitle eq myprocess" /T

If you are ok you can kill all java processes with wmic process where "name like 'java.exe'" delete

Recent Posts