- Run CMD, input
netstat -ano|findstr "port_number", it will list the process using this port. - Input command
tasklist | find “process_id”to get the process name.

如何占用一个端口
这个听起来有点无厘头,更多的是用来测试用。
当指定端口被占用时,需要提示给用户。在进行测试的时候,需要先把指定端口占住。找到一个小工具PortListener
下载地址:
http://www.rjlsoftware.com/software/utility/portlistener/download.shtml