“初始化 Java 工具”期间发生内部错误。在 Eclipse 中启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4568297/
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
An internal error occurred during "Initializing Java Tooling." in Eclipse on startup
提问by fastcodejava
I am getting this strange error on startup. What could be wrong in my environment?
我在启动时遇到这个奇怪的错误。我的环境可能有什么问题?
Here is the error :
这是错误:
>!ENTRY org.eclipse.core.jobs 4 2 2010-12-30 17:56:32.545
!MESSAGE An internal error occurred during: "Initializing Java Tooling".
!STACK 0
org.eclipse.equinox.internal.provisional.frameworkadmin.FrameworkAdminRuntimeException: Not a file url: ../p2/
at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.loadWithoutFwPersistentData(EquinoxManipulatorImpl.java:368)
at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.load(EquinoxManipulatorImpl.java:331)
at org.eclipse.pde.internal.core.target.AbstractBundleContainer.getVMArguments(AbstractBundleContainer.java:722)
at org.eclipse.pde.internal.core.target.TargetPlatformService.newDefaultTargetDefinition(TargetPlatformService.java:493)
at org.eclipse.pde.internal.core.PluginModelManager.initDefaultTargetPlatformDefinition(PluginModelManager.java:458)
at org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:428)
at org.eclipse.pde.internal.core.PluginModelManager.getWorkspaceModels(PluginModelManager.java:886)
at org.eclipse.pde.core.plugin.PluginRegistry.getWorkspaceModels(PluginRegistry.java:176)
at org.eclipse.pde.internal.core.SearchablePluginsManager.computeContainerClasspathEntries(SearchablePluginsManager.java:128)
at org.eclipse.pde.internal.core.ExternalJavaSearchClasspathContainer.getClasspathEntries(ExternalJavaSearchClasspathContainer.java:29)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2584)
at org.eclipse.jdt.internal.core.JavaProject.resolveClasspath(JavaProject.java:2679)
at org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:1866)
at org.eclipse.jdt.core.JavaCore.initializeAfterLoad(JavaCore.java:3443)
at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:35)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.net.URISyntaxException: Not a file url: ../p2/
at org.eclipse.equinox.internal.frameworkadmin.equinox.utils.FileUtils.fromFileURL(FileUtils.java:192)
at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser.readp2DataArea(EquinoxFwConfigFileParser.java:362)
at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser.readFwConfig(EquinoxFwConfigFileParser.java:224)
at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxManipulatorImpl.loadWithoutFwPersistentData(EquinoxManipulatorImpl.java:366)
回答by raj
Do not delete all the full .metadata
不要删除所有完整的 .metadata
- Backup .metadata
- delete only .metadata/.plugins/org.eclipse.core.resources/.project
- restart eclipse
- 备份 .metadata
- 仅删除 .metadata/.plugins/org.eclipse.core.resources/.project
- 重启日食
Observation : the projects folders are created
观察:创建了项目文件夹
Further - if you are using svn/git/hg have code repository links it would be destroyed, so to reinstate
此外 - 如果您使用 svn/git/hg 有代码存储库链接,它将被销毁,因此要恢复
- close eclipse
- copy relevant projects from backup to merge with current projects in .metadata/.plugins/org.eclipse.core.resources/.project
- restart eclipse
- 日食
- 从备份中复制相关项目以与 .metadata/.plugins/org.eclipse.core.resources/.project 中的当前项目合并
- 重启日食
Downfall - sporadic fail error may occur (sync or something) - harmless
垮台 - 可能会发生零星的失败错误(同步或其他) - 无害
回答by user1373225
Deleting only .metadata/.plugins/org.eclipse.core.resources/.project really helped me with my problem, that was just the same about Initializing Java Tool. Who have this problem should try this solution.
仅删除 .metadata/.plugins/org.eclipse.core.resources/.project 确实帮助我解决了我的问题,这与 Initializing Java Tool 相同。谁有这个问题应该尝试这个解决方案。
回答by hallatech
OSX Eclipse Luna was hanging for me at the 30% mark of Initializing Java Tool. After a number of startups and force quit cycles I started eclipse from the command line:
OSX Eclipse Luna 在 Initializing Java Tool 的 30% 标记处挂起。经过多次启动和强制退出循环后,我从命令行启动了 eclipse:
/usr/local/eclipse-luna/eclipse --clean
/usr/local/eclipse-luna/eclipse --clean
Then closed eclipse and restarted from the taskbar and all OK This resolved the problem for me
然后关闭eclipse并从任务栏重新启动,一切OK这为我解决了问题
回答by Lucky
If cleaning .metadata
folder doesn't work for you there's another solution you might want to try. "Just close the eclipse and open it again". That worked for my eclipse-mars running on Windows 7 64 bit OS. I believe it will work for Android projects too which runs in eclipse environment.
如果清理.metadata
文件夹对您不起作用,您可能想尝试另一种解决方案。“只需关闭日食并再次打开它”。这适用于我在 Windows 7 64 位操作系统上运行的 eclipse-mars。我相信它也适用于在 eclipse 环境中运行的 Android 项目。
回答by Pedro Cuello
The answer from "raj" is ok, thank you men! it is correct.
“raj”的回答没问题,谢谢各位!它是正确的。
In addition to his solution i have to comment. Please save a copy of your .metadata
除了他的解决方案,我还必须发表评论。请保存您的 .metadata 副本
Take care when you delete the folder: .metadata/.plugins/org.eclipse.core.resources/.project
删除文件夹时要小心:.metadata/.plugins/org.eclipse.core.resources/.project
There is some folder called "RemoteSystemsTempFiles" and now you won't see the trouble when you start eclipse but you will other error when you close eclipse, because the folder "RemoteSystemsTempFiles" doesn't exist into .projects
有一些名为“RemoteSystemsTempFiles”的文件夹,现在您在启动 eclipse 时不会看到问题,但在关闭 eclipse 时会出现其他错误,因为 .projects 中不存在文件夹“RemoteSystemsTempFiles”
So you will ned to copy your .metadataCOPIA/.plugins/org.eclipse.core.resources/.project/RemoteSystemsTempFiles to .metadata/.plugins/org.eclipse.core.resources/.project/RemoteSystemsTempFiles
所以你需要将你的 .metadataCOPIA/.plugins/org.eclipse.core.resources/.project/RemoteSystemsTempFiles 复制到 .metadata/.plugins/org.eclipse.core.resources/.project/RemoteSystemsTempFiles
So, the quick fix to the error "“Initializing Java Tooling.” in Eclipse on startup" for me is:
因此,快速修复错误““初始化 Java 工具”。在 Eclipse 启动时”对我来说是:
1- Copy the folder ".metadata" of your workspace in a copy. 2- Delete the folder ".metadata/.plugins/org.eclipse.core.resources/.project" 3- Close eclipse > You will get an error on closing eclipse. 4- Copy the folder .metadataCOPIA/.plugins/org.eclipse.core.resources/.project/RemoteSystemsTempFiles to .metadata/.plugins/org.eclipse.core.resources/.project/RemoteSystemsTempFiles 5- Star Eclipse and all is ok.
1- 将工作区的文件夹“.metadata”复制到副本中。2- 删除文件夹“.metadata/.plugins/org.eclipse.core.resources/.project” 3- 关闭 eclipse > 关闭 eclipse 时会出现错误。4- 将文件夹 .metadataCOPIA/.plugins/org.eclipse.core.resources/.project/RemoteSystemsTempFiles 复制到 .metadata/.plugins/org.eclipse.core.resources/.project/RemoteSystemsTempFiles 5- Star Eclipse 一切正常.
Regards,
问候,
回答by Jeff E
Old question, but I still get this error in Luna. A safe way to clear out the .projects folder is through the UI by deleting all projects without deleting from disk then importing them back into the workspace.
老问题,但我在 Luna 中仍然遇到此错误。清除 .projects 文件夹的一种安全方法是通过 UI 删除所有项目而不从磁盘中删除,然后将它们导入回工作区。