简体   繁体   中英

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

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!

按钮在控制台之间切换(如果直接按下),或选择控制台查看(如果按下拉箭头)

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.

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

在此输入图像描述

在此输入图像描述

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

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.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM