Problem description

java.net.BindException: Address already in use: JVM_Bind

Web server failed to start. Port 8899 was already in use.

If you encounter similar problems above, it means that your port number is already in use. We commonly call this problem as the port number being occupied.

The solution

  1. Win +R opens the Windows computer operation window and enters CMD instructions in the text input box of the operation window
  2. In the command window (terminal), enter the command netstat – ano | findstr searches, 8080808 is that we need to query the port number.
  3. We’re going to get the response that the system gives us, and on the first line of the query there’s a number that we need to remember
  4. There are two modes we can use to kill the occupied port number

    • Terminal directive taskkill -pid pid value -f
    • Graphical interface
  5. There are also some terminal instructions involved

    • Check all port numbers for netstat-ano
    • For process information by pid tasklist | findstr searches pid values
    • Kills the taskkill /f /t /im process name by the process name