I close my intellij idea, choose [disconnect]

Viewed 1035

I ran a project on Intellij , and then I closed my Intellij by choosing [disconnect] when I closed my Intellij. When I opened the program again to run my project, Intellij reminded me that port 8080 was occupied. I knew I could finish the project by killing port 8080. I wondered if there was any way that Intellij could end it directly.

I'm sorry that my English is not so good. It's translated online.

This is my img

1 Answers

You can't terminate disconnected program from IDEA. You need to find it by port and then terminate it manually.

In Linux you may use something like this:

$ ss -tulpn | grep 8080
tcp     LISTEN   0        100                                         *:8080                        *:*            users:(("java",pid=1290385,fd=287))          
$ kill -2 1290385

ss command finds listening ports, grep finds port 8080, pid is number of your process and then you terminate the process with kill.

Related