How to shutdown com.sun.net.httpserver.HttpServer?

前端 未结 4 1780
暗喜
暗喜 2021-02-10 12:34

The Http Server embedded in JDK 6 is a big help developing web services, but I\'ve got situation where I published an Endpoint and then the code crashed and left the server runn

4条回答
  •  孤独总比滥情好
    2021-02-10 13:21

    netstat -a
    

    to find the pid of the process that has the port open (assuming you know the port), and

    kill -9 $pid
    

    to kill the process.

提交回复
热议问题