Unable to debug in Java with eclipse

后端 未结 11 1168
情话喂你
情话喂你 2020-12-03 06:55

I am trying to debug a simple Java application on my machine using Eclipse as an IDE. When I try to debug the application by entering the Debug Perspective, I set a breakpoi

11条回答
  •  悲&欢浪女
    2020-12-03 07:32

    Continuing @gonadarian's answer, it seems Eclipse uses port 127.0.0.1 for debug purposes. This port is also called localhost. The way this error can be removed is by ensuring that there are no processes or services running on the above ports. The way to do this, on Linux is:

    1. As root, enter the command:
      netstat -tulpn | grep 127.0.0.1

    2. If there are processes running on the above port, it will show up in the format:
      process_id/process name.

    3. Kill the above processes like so: kill -KILL process_id

    4. Restart the computer for these changes to take effect. The error should no longer occur.

提交回复
热议问题