Eclipse 挂起,如何正确杀死它?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16961850/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 21:44:26  来源:igfitidea点击:

Eclipse hanging, how to kill it properly?

eclipse

提问by iluwatar

Sometimes my Eclipse hangs and I need to kill it violently. However, I have been unable to do it properly. It seems that kill -9 does not actually shut it down in a proper way since I can still see the hanged window. What command sequence would kill my Eclipse properly so I could restart it?

有时我的 Eclipse 挂起,我需要猛烈地杀死它。但是,我一直无法正确地做到这一点。似乎 kill -9 实际上并没有以正确的方式关闭它,因为我仍然可以看到挂起的窗口。什么命令序列会正确杀死我的 Eclipse 以便我可以重新启动它?

I am running Ubuntu 12.10 and Eclipse 4.2(Juno).

我正在运行 Ubuntu 12.10 和 Eclipse 4.2(Juno)。

回答by Uku Loskit

You can also use jps -lto get all of the process id's of java processes

您还可以使用jps -l来获取 Java 进程的所有进程 ID

回答by Michal Borek

You need to kill the javawprocess on which Eclipse runs (usually it is the one with about 1GB memory usage :) )

您需要javaw终止运行 Eclipse的进程(通常是使用大约 1GB 内存的进程:))

回答by Pritam Banerjee

Based on the answer of Uku and Michael you can do the following:

根据 Uku 和 Michael 的回答,您可以执行以下操作:

On your terminal first run:

在你的终端上第一次运行:

jps -l

Check the pid of the process that is running Eclipse and copy the pid.

检查运行 Eclipse 的进程的 pid 并复制 pid。

Then kill the process id by running:

然后通过运行终止进程 ID:

// use the actual process id
kill -p {the_copied_pid}