EN
Windows / cmd.exe - kill process that uses port 8080 (default Tomcat port)
9 points
In this short article, you we would like to show how to kill process that uses port 8080 using cmd.exe (under Windows).
Motivation:
Sometimes when we stop debugger, Tomcat proces still works, and it is necessary to kill it manually using Windows Command Prompt.
Quick solution:
xxxxxxxxxx
1
netstat -ano | findstr :8080
2
taskkill /PID 8224 /F
Where: 8224
is PID returned from netstat
command.
In this section, you can find complete example how to kill process run on port 8080
using Windows Command Prompt.
Commands example:
xxxxxxxxxx
1
C:\> netstat -ano | findstr :8080
2
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 8224
3
TCP [::]:8080 [::]:0 LISTENING 8224
4
5
C:\> taskkill /PID 8224 /F
6
SUCCESS: The process with PID 8224 has been terminated.
Where:
netstat -ano | findstr :8080
lists all processes that use port8080
,taskkill /PID 8224 /F
kills indicated process by PID, e.g.8224
.
Graphical example:
