Eclipse无法创建新的java项目

时间:2016-04-07 21:11:36

标签: java linux eclipse opensuse

我在openSUSE Tumbleweed上运行Eclipse 4.5.2(Mars)。不幸的是我无法创建Java项目,因为在点击new-> Java Projects后,没有任何反应......

我已经重新安装了eclipse,清除了元数据,从我的主目录中删除了用户数据。没有任何效果。

我刚在日志中收到以下错误消息: name =未处理的事件循环异常; plugin = org.eclipse.ui;

异常堆栈跟踪:

ava.lang.NullPointerException
at org.eclipse.swt.widgets.TabFolder.gtk_switch_page(TabFolder.java:570)
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:14774)
at org.eclipse.swt.widgets.TabFolder.createItem(TabFolder.java:311)
at org.eclipse.swt.widgets.TabItem.createWidget(TabItem.java:123)
at org.eclipse.swt.widgets.TabItem.<init>(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.createContents(WizardDialog.java:597)
at org.eclipse.jface.window.Window.create(Window.java:430)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1096)
at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:123)
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:694)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
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: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: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.buildId=4.5.2.M20160212-1500
java.version=1.8.0_77
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments:  -data file:/home/andi/workspace/eclipse/ -os linux -ws gtk -arch x86_64

非常感谢你的帮助!

1 个答案:

答案 0 :(得分:25)

你没有指定运行Eclipse的桌面环境(KDE,GNOME,LXDE),无论如何Eclipse似乎not to be very compatible with the new GTK3

我解决了迫使eclipse与GTK2一起使用的问题,您可以在eclipse.ini文件中添加以下两行:

--launcher.GTK_version
2

确保在--launcher.appendVmargs行上方添加两行。