Eclipse 加载但给出错误“初始化 Java 工具”

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

Eclipse loads but gives an error "initializing java tooling"

eclipse

提问by Jaime Garza

I have been running eclipse properly. After it loads I get: "Initializing Java Tooling". Incompatible magic value 0 in class file org/eclipse/jdt/internal/core/search/BasicSearchEngine

我一直在正确运行eclipse。加载后,我得到:“初始化 Java 工具”。类文件 org/eclipse/jdt/internal/core/search/BasicSearchEngine 中不兼容的魔法值 0

I have been looking, and what I have found is Eclipse hanging initializing java tooling

我一直在寻找,我发现的是 Eclipse 挂起初始化 java 工具

I have set JAVA_HOME and -vm in eclipse.ini

我已经在 eclipse.ini 中设置了 JAVA_HOME 和 -vm

Still, no success.

尽管如此,还是没有成功。

Any ideas would be appreciated

任何想法,将不胜感激

======= Added after I solved the issue (Stack Overflow won't let me post this as an answer cause I am of ill repute.)

======== 在我解决问题后添加(堆栈溢出不会让我将此作为答案发布,因为我名声不佳。)

Never mind.

没关系。

It may be important to have the answer to what I did so that people that have the same issue does not have to go through the hoops I went.

对我所做的事情有一个答案可能很重要,这样有同样问题的人就不必经历我所经历的困境。

First, I went to the Help/About Eclipse/Installation Details. In the Installation History, with using compare and revert, I started reverting what I had installed (Compare and Revert are pretty cool BTW.) I finally detected which was the latest stable version, and the installation that broke it all

首先,我转到帮助/关于 Eclipse/安装详细信息。在安装历史中,通过使用比较和还原,我开始还原我安装的内容(比较和还原非常酷顺便说一句。)我终于检测到哪个是最新的稳定版本,并且安装破坏了这一切

Spring Source at http://dist.springsource.com/release/TOOLS/update/e3.7

Spring 源在http://dist.springsource.com/release/TOOLS/update/e3.7

Initially I selected some extra components that sounded cool, but the second time around I pretty much went for the required, plus support for AOP, Web Tools, and Flex and WebServices. Other than that I ignored all the rest of the stuff. That worked.

最初我选择了一些听起来很酷的额外组件,但第二次我几乎选择了所需的组件,以及对 AOP、Web 工具以及 Flex 和 WebServices 的支持。除此之外,我忽略了所有其余的东西。那行得通。

I had selected before (one of the ones that killed it, do not exactly which one), in addition to what I left installed: Spring Mylyn Integration Spring Tool Suite AWS Integration Spring Tool Suite Maven Support Eclipse Weaving Source

我之前选择了(杀死它的一个,不确切是哪个),除了我留下的安装:Spring Mylyn Integration Spring Tool Suite AWS Integration Spring Tool Suite Maven Support Eclipse Weaving Source

I also had the "Mylyn Builds Connector: Jenkins/Hudson integration", which had worked for me in the past. I still suspect that it was one of the Spring components.

我还有“Mylyn Builds Connector:Jenkins/Hudson 集成”,它在过去对我有用。我仍然怀疑它是Spring组件之一。

I hope this helps

我希望这有帮助

回答by Jaime Garza

Usually, a restart will solve this issue. As @Carsten mentioned, close all open files and terminate eclipse then re-launch the application. I have encountered this problem many times. The causes of this range from:

通常,重新启动将解决此问题。正如@Carsten 提到的,关闭所有打开的文件并终止 eclipse 然后重新启动应用程序。我多次遇到这个问题。造成这种情况的原因包括:

  1. Low memory assigned to eclipse. You could increase the memory by editing the eclipse.ini file and change the options -X* JAVA_OPTS
  2. Loading large files (XML is always a culprit in this case).
  3. Attempting to format large XML files
  4. Immediately after installing a new plugin and not restarting eclipse right away etc
  1. 分配给 eclipse 的内存不足。您可以通过编辑 eclipse.ini 文件并更改选项 -X* JAVA_OPTS 来增加内存
  2. 加载大文件(在这种情况下,XML 始终是罪魁祸首)。
  3. 尝试格式化大型 XML 文件
  4. 安装新插件后立即不立即重新启动 eclipse 等

回答by DIleep

Clean \Workspaces\MyEclipse 8.5 M2.metadata.plugins\org.eclipse.core.resources.projects folder after closing eclipse/myeclipse .That's it.

关闭 eclipse/myeclipse 后清理 \Workspaces\MyEclipse 8.5 M2.metadata.plugins\org.eclipse.core.resources.projects 文件夹。就是这样。

回答by nicordesigns

This is an STS issue however they blame it on an Eclipse bug which has been fixed: https://issuetracker.springsource.com/browse/STS-696. If you look at the dependencies of the STS plugin you will notice that the Eclipse WTP version is way passed the one that is mentioned in the Eclipse Bug..

这是一个 STS 问题,但他们将其归咎于已修复的 Eclipse 错误:https: //issuetracker.springsource.com/browse/STS-696。如果您查看 STS 插件的依赖项,您会注意到 Eclipse WTP 版本已经超过了 Eclipse Bug 中提到的版本。