操作系统:
$uname -a Linux ***-workspace 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9 09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
eclipse错误描述:在启动eclipse的时候,选定工作目录后,eclipse闪退,并叫我看工作目录下的.metadata/.log日志查看问题
!ENTRY org.eclipse.osgi 4 0 2017-09-01 08:20:00.988 !MESSAGE Application error !STACK 1 org.eclipse.swt.SWTError: No more handles [Unknown Mozilla path (MOZILLA_FIVE_HOME not set)] at org.eclipse.swt.SWT.error(SWT.java:4387) at org.eclipse.swt.browser.Mozilla.initMozilla(Mozilla.java:1936) at org.eclipse.swt.browser.Mozilla.create(Mozilla.java:699) at org.eclipse.swt.browser.Browser.<init>(Browser.java:99) at winterwell.markdown.views.MarkdownPreview.createPartControl(MarkdownPreview.java:41) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:386) at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:240) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595) at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:315) at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534) at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180) at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270) at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245) at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:662) at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570) at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568) at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272) at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981) at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2718) at org.eclipse.ui.internal.WorkbenchWindow$28.run(WorkbenchWindow.java:3030) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3011) at org.eclipse.ui.internal.WorkbenchWindow$21.runWithException(WorkbenchWindow.java:2297) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803) at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1600) at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2609) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414) !ENTRY org.eclipse.core.jobs 2 2 2017-09-01 08:20:01.474 !MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.ui.internal.ide.IDEWorkbenchActivityHelper$4
错误分析:
通过查找方案,分析是有以下问题引起的。由于我Ubuntu系统被误操作破坏了后,重新安装了,讲原来的home目录直接挂在到新的系统下面使用,也就是说eclipse是新装的,而工作目录是以前的,而工作目录中记录了以前装的markdown插件时安装的libwebkitgtk-1.0-0相关信息,在新的eclipse下没有,所以启动崩溃。
解决方案:
1. 用以下命令安装需要的插件即可。
$ sudo apt-get install libwebkitgtk-1.0-0
2.或者删掉工作目录下的以前的记录目录。
$rm -rf workspace/.metadata
总结:
想起来也是一阵后怕,这次算是运气好,所以找到了第一个解决方案的原因,系统错误尽量对系统进行修复,而不是重装,重装可能引起一系列的环境还原的问题。