eclipse使用报错:Problems occurred when invoking code from plug-in: "org.eclipse.jface"

eclipse安装版本4.5.2新建项目报错,如下图:

eclipse使用报错:Problems occurred when invoking code from plug-in:

eclipse报错日日志:Problems occurred when invoking code from plug-in: "org.eclipse.jface"

java.lang.NullPointerException
    at org.eclipse.swt.widgets.TabFolder.gtk_switch_page(TabFolder.java:490)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2009)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4723)
    at org.eclipse.swt.internal.gtk.OS._gtk_widget_show(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_widget_show(OS.java:14727)
    at org.eclipse.swt.widgets.TabFolder.createItem(TabFolder.java:274)
    at org.eclipse.swt.widgets.TabItem.createWidget(TabItem.java:123)
    at org.eclipse.swt.widgets.TabItem.(TabItem.java:75)
    at org.eclipse.jdt.internal.ui.wizards.buildpaths.BuildPathsBlock.createControl(BuildPathsBlock.java:228)
    at org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage.createControl(JavaCapabilityConfigurationPage.java:162)
    at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:175)
    at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:705)
    at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1153)
    at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1211)
    at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1208)
    at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1197)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1194)
    at org.eclipse.ui.internal.dialogs.NewWizardSelectionPage.advanceToNextPageOrFinish(NewWizardSelectionPage.java:71)
    at org.eclipse.ui.internal.dialogs.NewWizardNewPage$1.doubleClick(NewWizardNewPage.java:361)
    at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:832)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
    at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:829)
    at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1470)
    at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1263)
    at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:252)
    at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:249)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:311)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
    at org.eclipse.jface.window.Window.open(Window.java:803)
    at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:115)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1488)

解决方案:

在eclipse的安装目录下,找到 eclipse.ini 文件,我这是ubuntu18.04

添加以下两行:

--launcher.GTK_version
2

我的文件截图

eclipse使用报错:Problems occurred when invoking code from plug-in:

你可能感兴趣的:(eclipse使用报错:Problems occurred when invoking code from plug-in: "org.eclipse.jface")