初始化 Java 工具时出现 Eclipse 内部错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10892790/
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
Eclipse internal error while initializing Java tooling
提问by al23dev
I am getting errors from Eclipse Indigo running on Windows 7 Ultimate. For each of the following items:
我从在 Windows 7 Ultimate 上运行的 Eclipse Indigo 收到错误消息。对于以下各项:
Android SDK content loader
Building workspace
Initializing Java Tooling
Loading data for Android 2.3.3
Loading data for Android 4.03
this error is thrown:
抛出此错误:
An internal error occurred during: "Initializing Java Tooling".java.lang.NullPointerException
What should I do?
我该怎么办?
采纳答案by Abhinai
Delete your existing workspace and then recreate the workspace and add your projects.
删除现有工作区,然后重新创建工作区并添加项目。
回答by AnhSirk Dasarp
Close all open projects and exit Eclipse. Now you can open Eclipse without getting the error. Start opening your projects one by one to find which one causes the problem. This is most likely because you deleted a Device profile inside the AVD manager.
关闭所有打开的项目并退出 Eclipse。现在您可以打开 Eclipse 而不会出现错误。开始一一打开您的项目,找出导致问题的原因。这很可能是因为您删除了 AVD 管理器中的设备配置文件。
Or you can start working on a new workspace, ( ie change your workspace ) , then try to import your project from the old workspace
或者您可以开始在新工作区上工作(即更改您的工作区),然后尝试从旧工作区导入您的项目
回答by Mohamed Abu Zeid
Just change the following values at "eclipse.ini"file to the following:
只需将“eclipse.ini”文件中的以下值更改为以下内容:
-Xms1024m
-Xmx2048m
Note:
笔记:
- You can find the "eclipse.ini"file by right click eclipse icon on and select "Open file location".
- This error occurs because the eclipse is running out of memory, so we just increased the assigned memory for the eclipse application.
- 您可以通过右键单击 eclipse 图标并选择“打开文件位置”来找到“eclipse.ini”文件。
- 出现这个错误是因为eclipse内存不足,所以我们只是增加了eclipse应用程序的分配内存。
回答by Sunny Tambi
- Close Eclipse.
- Go to workspace folder in windows explorer and delete following folders:
- .metadata
- .recommenders
- RemoteSystemsTempFiles
- Servers
- Open Eclipse and provide the same workspace folder again during launch.
- 关闭日食。
- 转到 Windows 资源管理器中的工作区文件夹并删除以下文件夹:
- .元数据
- .推荐人
- 远程系统临时文件
- 服务器
- 打开 Eclipse 并在启动期间再次提供相同的工作区文件夹。
回答by Zsolt Z.
I would just like to add, that simply closing and reopening eclipse has always worked for me with this type of error.
我只想补充一点,简单地关闭和重新打开 eclipse 一直对我有用,但会出现此类错误。
回答by Saket Sinha
I faced the same issue. But changing two configuration in eclipse.ini resolved my issue.
我遇到了同样的问题。但是在 eclipse.ini 中更改两个配置解决了我的问题。
-Xms512m to -Xms1024m and -Xmx1024m to -Xmx2048m
-Xms512m 到 -Xms1024m 和 -Xmx1024m 到 -Xmx2048m
回答by DIleep
NO Need to create another work-space and import all the projects from the older one : Just empty \Workspaces\MyEclipse 8.5 M2.metadata.plugins\org.eclipse.core.resources.projects directory and restart myeclipse/eclipse
不需要创建另一个工作空间并从旧的工作空间导入所有项目:只需清空 \Workspaces\MyEclipse 8.5 M2.metadata.plugins\org.eclipse.core.resources.projects 目录并重新启动 myeclipse/eclipse
回答by ArifMustafa
Check your Project -> Properties -> Java Build Path has
JDK
Library instead ofJRE System Library
.Go to
Eclipse
installed directory, Searcheclipse.ini
-> Open it
检查您的项目 -> 属性 -> Java 构建路径具有
JDK
库而不是JRE System Library
.转到
Eclipse
安装目录,搜索eclipse.ini
-> 打开它
Search lines for containing any below values:
包含以下任何值的搜索行:
-Xms512m -Xmx512m -Xms1024m -Xmx1024m -Xms1G -Xmx1G
-Xms512m -Xmx512m -Xms1024m -Xmx1024m -Xms1G -Xmx1G
Just double it the memory size, Assume you have to change the
只需将内存大小加倍,假设您必须更改
-Xms512m to -Xms1024m
-Xms512m 到 -Xms1024m
Increasing the eclipse memory size will help eclipse
to gain more RAM size from your PC.
增加 eclipse 内存大小将有助于eclipse
从您的 PC 中获得更多 RAM 大小。
回答by Sunil Kumar
Sometimes the issue is with the version of the Java installed. I was facing a similar issue when trying to start Spring Tool Suite on my Ubuntu 16.04. I had java 9 installed on my machine. I changed it to java 8. And it started working.
有时问题出在安装的 Java 版本上。尝试在我的 Ubuntu 16.04 上启动 Spring Tool Suite 时,我遇到了类似的问题。我的机器上安装了 java 9。我把它改成了 java 8。它开始工作了。
回答by Chris Gong
My issue was caused by some old Java projects using an old JRE System Library, so all I had to do was remove the old library and add the new one by right clicking the project -> Properties -> Java Build Path -> Libraries -> Add Library.
我的问题是由一些使用旧 JRE 系统库的旧 Java 项目引起的,所以我所要做的就是删除旧库并通过右键单击项目添加新库 -> 属性 -> Java 构建路径 -> 库 ->添加库。