eclipse says “already running”, but no big red “close” button

雨燕双飞 提交于 2021-02-19 07:14:28

问题


I am sure I would be able to find the answer if I knew the right terminology for some of these things, but basically the problem is:

Every time I have run a something in Eclipse (Java) before, there has been a square red button (hovertext "Terminate") in the "Console" tab of the bottom-right (wide) window (in "Java" perspective) that I could use to terminate a program.

I recently added a new project (to isolate and figure out some code I was having trouble with in the main project...but that's a different story), and now: (a) it seems to be running more than just what I want it to run, and (b) the red button is sometimes not available, but clearly something is running because when I hover over the "Run", button, it says "Run [program name here] (already running)" instead of "Run [program name here]".

Can anyone tell me why this would happen? Can anyone tell me how to terminate a program when you don't have a terminate button?

(...and I won't ask here how to get Eclipse to stop running things I don't want it to run, since I haven't scoured the internet for the answer to that one for long enough to justify a StackOverflow question, but it's probably coming...)

Update: This button cleared things up (after the double-x icon button hint helped). Eclipse should really have a separate "Console" tab for each console, though!

button to switch between consoles (if pressed directly), or select console to view (if press drop-down arrow)


回答1:


Sometimes the running console can be hidden behind a terminated console. Look for the grey double-x on the console display to remove inactive consoles, and see if your red box shows up again.




回答2:


Click the xX(double X) on console. this will remove all inactive consoles

enter image description here




回答3:


Click on the above icon and you can see all running applications or terminated whihch is in my case.




回答4:


Although the issue has been resolved, posting a method that would help MAC users.

I was running Tomcat on ports 8080(http) and 8443(https). The same error occurred as some processes are running on them and the following helped me.

lsof -i :8080 //returns the PID (process id) that runs on port 8080
kill 1234 //kill the process using PID (used dummy PID here)
lsof -i :8443
kill 4321

PID is shown as

COMMAND  PID       USER   FD  TYPE              DEVICE  SIZE/OFF  NODE  NAME
java     3240   vignesh  46u  IPv6  0x5ccb07da8bf4a3a5       0t0   TCP  *:http-alt (LISTEN)

Restarted eclipse and restarted the server. (Without eclipse restart, restarting the server alone didn't work for me.)



来源:https://stackoverflow.com/questions/17114321/eclipse-says-already-running-but-no-big-red-close-button

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!