简体   繁体   English

eclipse说“已经在运行”,但没有大红色的“关闭”按钮

[英]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. 每次我以前在Eclipse(Java)中运行某个东西时,在右下角(宽)窗口的“控制台”选项卡中(“Java”透视图)中有一个方形红色按钮(hovertext“Terminate”)我可以用来终止程序。

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]". 我最近添加了一个新项目(以隔离和找出我在主项目中遇到问题的一些代码......但这是一个不同的故事),现在:(a)它似乎运行的不仅仅是我想要的它运行,(b)红色按钮有时不可用,但显然有些东西正在运行,因为当我将鼠标悬停在“运行”按钮上时,它会显示“运行[此处的程序名称](已经运行)”而不是“运行[程序名称]“。

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...) (...我不会在这里问如何让Eclipse停止运行我不希望它运行的东西,因为我没有在互联网上搜索那个问题的答案足够长的时间来证明StackOverflow问题的合理性,但它可能会来......)

Update: This button cleared things up (after the double-x icon button hint helped). 更新:此按钮清除了(在双x图标按钮提示帮助后)。 Eclipse should really have a separate "Console" tab for each console, though! Eclipse应当确实对每个控制台一个独立的“控制台”标签,但!

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

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. 在控制台显示屏上查找灰色的double-x以删除非活动控制台,并查看您的红色框是否再次显示。

Click the xX(double X) on console. 单击控制台上的xX(双X)。 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. 虽然问题已经解决,但是发布一个可以帮助MAC用户的方法。

I was running Tomcat on ports 8080(http) and 8443(https). 我在端口8080(http)和8443(https)上运行Tomcat。 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 PID显示为

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. 重启eclipse并重启服务器。 (Without eclipse restart, restarting the server alone didn't work for me.) (没有eclipse重启,单独重启服务器对我没用。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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