eclipse 构建工作区时日食卡住了

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

eclipse stuck when building workspace

eclipsebuildwindows-vista

提问by sean

I am using eclipse 3.4.1 Java EE under Vista. It seems to like getting stuck when building my workspace. Canceling the build doesn't seem to do anything as well.

我在 Vista 下使用 eclipse 3.4.1 Java EE。似乎在构建我的工作区时陷入困境。取消构建似乎也没有任何作用。

Why is this happening and how do I fix the problem?

为什么会发生这种情况,我该如何解决这个问题?

采纳答案by JesperE

You may want to take a look at How to report a deadlock. You may also want to check the Error view and/or the error log ([workspace]/.metadata/.log). If that doesn't help, you'll probably need to include more info about which plugins you have installed and which projects you have. Can you create a minimal workspace which reproduces the problem?

您可能需要查看如何报告死锁。您可能还想检查错误视图和/或错误日志 ([workspace]/.metadata/.log)。如果这没有帮助,您可能需要包含有关您安装了哪些插件以及您拥有哪些项目的更多信息。你能创建一个重现问题的最小工作空间吗?

回答by James Beninger

I was able to fix this with the following:

我能够通过以下方式解决这个问题:

First, exit Eclipse. Then temporarily move the following .projectsfolder to a safe location:

首先,退出Eclipse。然后暂时将以下.projects文件夹移动到安全位置:

mv .metadata\.plugins\org.eclipse.core.resources\.projects projects

Start and exit Eclipse, then move the .projectsfolder back to where it was originally:

启动并退出 Eclipse,然后将.projects文件夹移回原来的位置:

mv projects .metadata\.plugins\org.eclipse.core.resources\.projects

Use at your own risk, of course.

当然,使用风险自负。

回答by Artem Barger

Some time it's very helpful to execute eclipse from command line with "-clean" parameter to enforce it produce clean up for workspace.

有时使用“-clean”参数从命令行执行 eclipse 以强制它为工作区产生清理是非常有帮助的。

回答by user2574678

eclipse -clean did not work but following did

eclipse -clean 没有用,但下面做了

eclipse -clean -clearPersistedState

回答by Terje Lundin

Eclipse often freezes for me at 44% if I'm debugging Android over USB. When disconnecting the device, Eclipse starts.

如果我通过 USB 调试 Android,Eclipse 经常会冻结在 44%。断开设备连接时,Eclipse 将启动。

回答by Terje Lundin

The accepted answer allowed me to get Eclipse started again, but it seems that the projects lost their metadata. (E.g., all the Git/Gradle/Spring icons disappeared from the project names.) I have a lot of projects in there, and I didn't want to have to import them all over again.

接受的答案使我能够再次启动 Eclipse,但这些项目似乎丢失了它们的元数据。(例如,所有 Git/Gradle/Spring 图标都从项目名称中消失了。)我有很多项目,我不想重新导入它们。

So here's what worked for me under Kepler. YMMV but I wanted to record this just in case it helps somebody.

所以这就是在开普勒下对我有用的东西。YMMV,但我想记录下来以防万一它对某人有帮助。

Step 1.Temporarily move the .projectsfile out of the way:

步骤 1.暂时将.projects文件移开:

$ cd .metadata/.plugins/org.eclipse.core.resources
$ mv .projects .projects.bak

Step 2.Then start Eclipse. The metadata will be missing, but at least Eclipse starts without getting stuck.

步骤 2.然后启动 Eclipse。元数据将丢失,但至少 Eclipse 启动时不会卡住。

Step 3.Close Eclipse.

步骤 3.关闭 Eclipse。

Step 4.Revert the .projects.bakfile to its original name:

步骤 4..projects.bak文件恢复为其原始名称:

$ mv .projects.bak .projects

Step 5.Restart Eclipse. It may build some stuff, but this time it should get through. (At least it did for me.)

步骤 5.重新启动 Eclipse。它可能会构建一些东西,但这次它应该会通过。(至少对我来说是这样。)

回答by bekur

Step1:

第1步:

Open project directory and edit .project file, remove following lines to disable java script validation.

打开项目目录并编辑 .project 文件,删除以下行以禁用 java 脚本验证。

  <buildCommand>
      <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
      <arguments>
      </arguments>
    </buildCommand>

Save file.

保存存档。

Step 2:

第2步:

Go to Eclipse installed directory and open eclipse.ini(or sts.in if you have STS), change xms and xmx value based on your RAM size of your computer.

转到 Eclipse 安装目录并打开 eclipse.ini(或 sts.in,如果您有 STS),根据您计算机的 RAM 大小更改 xms 和 xmx 值。

-Xms512m
-Xmx1024m
-XX:MaxPermSize=256m

OR: in windows, go to eclipse shortcut in desktop, right click->properties-> add following: C:\software\eclipse\sts-3.6.2.RELEASE\STS.exe -clean -Xms512m -Xmx1024m

或者:在 Windows 中,转到桌面上的 eclipse 快捷方式,右键单击->属性-> 添加以下内容:C:\software\eclipse\sts-3.6.2.RELEASE\STS.exe -clean -Xms512m -Xmx1024m

Run Eclipse.

运行 Eclipse。

Go to Eclipse->windows->preference->Validation, enable Suspend all validators. Do this if you don't want do any validation listed in the list given in Validator panel.

转到 Eclipse->windows->preference->Validation,启用 Suspend all validators。如果您不想执行 Validator 面板中给出的列表中列出的任何验证,请执行此操作。

回答by Pieter De Bie

I have this problem whe I have too much maven projects open at once. What I tend to do is:

当我同时打开太多 Maven 项目时,我遇到了这个问题。我倾向于做的是:

  • Restart eclipse (sometimes I need to kill eclipse)
  • Disable automatic build immediatly (project > uncheck Build automatically)
  • Right click the project(s) I want to have rebuild
  • Close unrelated projects
  • Re-enable automatic build
  • 重启eclipse(有时我需要杀死eclipse)
  • 立即禁用自动构建(项目 > 取消选中自动构建)
  • 右键单击我想要重建的项目
  • 关闭不相关的项目
  • 重新启用自动构建

This enables a functioning rebuild in 99% off the cases in my workspace.

这使我的工作区中的案例能够以 99% 的折扣进行功能重建。

回答by dxvargas

The only solution for me (Luna 4.4.1) was this:

对我来说唯一的解决方案(Luna 4.4.1)是这样的:

Go to Project Properties > Builders and then uncheck the Javascript Validator.

转到 Project Properties > Builders,然后取消选中 Javascript Validator。

回答by Anjan Dash

I faced Similar issue in Eclipse Indigo. I changed the HeapSize it started working correctly. I just added following eclipse.ini file -vmargs -Xms1024m -Xmx1024m

我在 Eclipse Indigo 中遇到了类似的问题。我更改了它开始正常工作的 HeapSize。我刚刚添加了以下 eclipse.ini 文件 -vmargs -Xms1024m -Xmx1024m

It worked fine after increasing the VM size

增加 VM 大小后它工作正常