Eclipse启动不了问题总结

Eclipse闪退/打不开/无法启动/一闪而过
解决方式:
1.通过在命令行中输入“where java”,找到除jdk目录下的所有java相关程序,直接删掉(一般会在C:\WINDOWS\system32下)
2.内存不足,打开Eclipse目录下的eclipse.ini,把里面的-Xmx512m改成-Xmx256m
3.检查环境变量,path变量中将jdk路径放在最前边(开头的“.;”直接后边)
4.检查环境变量,path变量中将jdk中的jre路径放在最前边(开头的“.;”直接后边)
5.传言中的万能方案(不过估计非万能):把jdk目录下的jre目录直接复制到eclipse目录下
6.删除文件:[workspace]/.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
本人在启动Eclipse时报的错误如下:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.ensureCapacityInternal(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at org.eclipse.core.internal.filebuffers.FileStoreTextFileBuffer.setDocumentContent(FileStoreTextFileBuffer.java:598)
at org.eclipse.core.internal.filebuffers.FileStoreTextFileBuffer.initializeFileBufferContent(FileStoreTextFileBuffer.java:355)
at org.eclipse.core.internal.filebuffers.FileStoreFileBuffer.create(FileStoreFileBuffer.java:63)
at org.eclipse.core.internal.filebuffers.TextFileBufferManager.connectFileStore(TextFileBufferManager.java:150)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.createFileInfo(TextFileDocumentProvider.java:567)
at org.eclipse.ui.editors.text.TextFileDocumentProvider.connect(TextFileDocumentProvider.java:478)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4233)
at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:237)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1480)
at org.eclipse.ui.editors.text.TextEditor.doSetInput(TextEditor.java:169)
at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3220)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2099)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3238)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3265)
at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:390)
at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:305)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:898)
at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:879)
at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:121)
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:345)
at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:264)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
通过方法6解决啦。
eclipse启动无响应,停留在Loading workbench状态
做开发的同学们或多或少的都会遇到eclipse启动到一定程度时,就进入灰色无响应状态再也不动了。启动画面始终停留在Loading workbench状态。反复重启,状态依旧。
       多数情况下,应该是非正常关闭eclipse工作区的文件状态错误所导致的。
       在工作区目录中,有一个.metadata目录,里面是工作区及各插件的信息,删除此目录,再重启eclipse,果然可以正常启动eclipse了,但原来工作区的配置和项目信息也都消失,直接显示的是eclipse欢迎界面。
       那么怎么做才能保证之前的配置不丢失呢?这时想到启动停止时显示的状态:"Loading workbench",看来和这个workbench插件有关。查看工作空间中的.metadata/.plugins目录,在众多文件夹中
com.collabnet.subversion.merge          org.eclipse.search
org.eclipse.compare                           org.eclipse.team.core
org.eclipse.core.resources                  org.eclipse.team.cvs.core
org.eclipse.core.runtime               org.eclipse.team.ui
org.eclipse.debug.core                 org.eclipse.ui.ide
org.eclipse.debug.ui                   org.eclipse.ui.intro
org.eclipse.dltk.core                    org.eclipse.ui.views.log
org.eclipse.dltk.core.index.sql.h2     org.eclipse.ui.workbench
org.eclipse.dltk.ui                           org.eclipse.ui.workbench.texteditor
org.eclipse.epp.usagedata.recording    org.eclipse.wb.discovery.core
org.eclipse.jdt.core                             org.eclipse.wst.internet.cache
org.eclipse.jdt.ui                                 org.eclipse.wst.jsdt.core
org.eclipse.ltk.core.refactoring          org.eclipse.wst.jsdt.ui
org.eclipse.ltk.ui.refactoring            org.eclipse.wst.jsdt.web.core
org.eclipse.m2e.core                    org.eclipse.wst.sse.ui
org.eclipse.m2e.logback.configuration  org.eclipse.wst.validation
org.eclipse.mylyn.bugzilla.core        org.eclipse.wst.xml.core
org.eclipse.mylyn.tasks.ui             org.tigris.subversion.subclipse.core
org.eclipse.php.core                   org.tigris.subversion.subclipse.graph
org.eclipse.php.ui                     org.tigris.subversion.subclipse.ui

发现了两个: org.eclipse.ui.workbench[b]org.eclipse.ui.workbench.texteditor[/b]。删了这两个目录,重新启动eclipse。正常启动且原项目信息正确加载。

[b]关于 eclipse启动卡死的问题(eclipse上一次没有正确关闭,导致启动的时候卡死错误解决方法),自己常用的解决方法:
      方案一(推荐使用,如果没有这个文件,就使用方案二):
      到<workspace>\.metadata\.plugins\org.eclipse.core.resources目录,删除文件 .snap
      方案二:
      进入workspace/.metadata/.plugins/目录
      重命名 org.eclipse.core.resources to org.eclipse.core.resources_old.
      然后重启 eclipse
      Close eclipse
      Delete org.eclipse.core.resources
      Rename org.eclipse.core.resources_old back to org.eclipse.core.resources
      启动 eclipse
[/b]

以上内容来源:http://blog.csdn.net/sinat_24946363/article/details/50884041

猜你喜欢

转载自xu-nuo.iteye.com/blog/2392873