eclipse 杀Eclipse后台操作不杀Eclipse
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5574831/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Kill Eclipse background operation without killing Eclipse
提问by Rob Agar
Is there any way to kill an Eclipse background operation without killing Eclipse itself?
有没有办法在不杀死 Eclipse 本身的情况下杀死 Eclipse 后台操作?
Specifically, I want to kill stalled Subclipse SVN operations. Clicking 'cancel' pops up a little Cancel Requestedmessage, but the operation still sits there forever blocking everything else.
具体来说,我想终止停滞的 Subclipse SVN 操作。单击“取消”会弹出一条取消请求消息,但该操作仍然会永远阻止其他所有操作。
This is Eclipse Helios on Windows 7 if that makes any difference.
如果这有什么不同的话,这就是 Windows 7 上的 Eclipse Helios。
采纳答案by Newtopian
Killing the task from the Progress window (Window->Show View->Other|General->Progress or Alt+Shift+Q, Q | General->Progress).
从“进度”窗口(Window->Show View->Other|General->Progress 或 Alt+Shift+Q, Q | General->Progress)终止任务。
Then choose the offending thread and click the red square.
然后选择有问题的线程并单击红色方块。
Note it sometimes takes a delay before the kill occur, you may also have to kill other thread in there to get what you want. Lastly it does not always work, if this fails I usually just restart eclipse.
请注意,有时在杀死发生之前需要延迟,您可能还必须杀死那里的其他线程才能获得所需的内容。最后它并不总是有效,如果失败,我通常只是重新启动 eclipse。
Hope this helps
希望这可以帮助
回答by A Khazaal
I was able to stop/terminate the hanging SVN commit process by briefly disconnecting the network adapter. This saved me from killing the Eclipse process, which if not terminated gracefully is known to cause other headaches.
我能够通过短暂断开网络适配器来停止/终止挂起的 SVN 提交过程。这使我免于杀死 Eclipse 进程,如果不正常终止,已知会导致其他麻烦。
回答by mkczyk
If you go to window Progress in Eclipse and click red square to Stop:
如果您转到 Eclipse 中的 Progress 窗口并单击红色方块停止:
and next, red square becomes gray square and process i frozen (Cancel Requested):
接下来,红色方块变成灰色方块,进程 i 被冻结(取消请求):
You must use Task Manager (Alt+Ctrl+Del on Windows) for kill process. Go to tab Processes, find process javaw.exe
* and click End Process.
您必须使用任务管理器(Windows 上的 Alt+Ctrl+Del)来终止进程。转到选项卡进程,找到进程javaw.exe
* 并单击结束进程。
The result: frozen process in Eclipse was closed but your Eclipse wasn't closed.
结果:Eclipse 中的冻结进程已关闭,但您的 Eclipse 并未关闭。
* Process with name javaw.exe
is for WildFly server. For Subclipse SVN can be another name of proces.
* 带有名称的进程javaw.exe
用于 WildFly 服务器。对于 Subclipse SVN 可以是进程的另一个名称。
回答by Frederic Leitenberger
I was able to unstuck Eclipse (it was stuck on a large file diff) using the following steps.
我能够使用以下步骤解开 Eclipse(它被卡在一个大文件差异上)。
- Preparations: I always start Eclipse with the eclipse-console: Add start parameter -consolein eclipse.ini(first line)
- The console always remains responsive even when the eclipse UI freezes
- I found the following commands in the console: help threads
- List all threads: threads
- Stop a thread: threads stop THREAD-NAME
- 准备工作:我总是用 eclipse-console 启动 Eclipse:在eclipse.ini 中添加启动参数-console(第一行)
- 即使 Eclipse UI 冻结,控制台也始终保持响应
- 我在控制台中找到了以下命令:帮助线程
- 列出所有线程:线程
- 停止线程:线程停止线程名称
UPDATE:I found out, that usually the "main" thread causes the freezing. Thus the solution is:
更新:我发现,通常“主”线程会导致冻结。因此解决方案是:
Type this in the eclipse console:
在 Eclipse 控制台中输入:
threads stop main
This will trigger/throw an Exception in that thread, effectively interrupting what it was doing (being stuck).
这将在该线程中触发/抛出异常,有效地中断它正在执行的操作(被卡住)。
This mightcause other side-effects (depending on what action was interrupted and where), but i had no problems with it so far.
这可能会导致其他副作用(取决于中断的操作和位置),但到目前为止我没有遇到任何问题。
回答by Savitha Ganpathi
I'm not sure, but from the Debug perspective, you may be able to view the thread that's performing the background operation and kill it from there for quicker exit.
我不确定,但从 Debug 的角度来看,您可能能够查看正在执行后台操作的线程并从那里终止它以更快地退出。
回答by Brian B
I had a problem where the external compiler I was using froze up when I tried to cancel the build operation. It was stuck in the "Cancel Requested" state. I went to the Windows Task Manager and found my compiler process and terminated it. That allowed Eclipse to continue and successfully cancel the operation.
我遇到了一个问题,当我尝试取消构建操作时,我正在使用的外部编译器冻结了。它停留在“取消请求”状态。我去了 Windows 任务管理器,找到了我的编译器进程并终止了它。这允许 Eclipse 继续并成功取消操作。
回答by Piotr Kostański
In console window, open "Open OSGi Console" from drop button.
In this console you can type command threads
. This will show all running threads.
You can kill process with command threads stop '<Process name>'
. Remember to use single apostrophe '
surrounding <Process name>
, otherwise it won't work.
在控制台窗口中,从下拉按钮打开“打开 OSGi 控制台”。在此控制台中,您可以键入 command threads
。这将显示所有正在运行的线程。您可以使用 command 终止进程threads stop '<Process name>'
。记住在'
周围使用单个撇号<Process name>
,否则它将不起作用。
For example, I had to type:
例如,我必须输入:
threads stop 'Worker-12: Refresh DSLD scripts'