问题描述
我在使Eclipse Luna工作时遇到了一些麻烦。我从eclipse网站下载了tar.gz,并下载了Java JDK的tar.gz。我提取了所有内容并且Eclipse正常打开,但是当我尝试创建一个新项目时,它就崩溃了。在终端我运行java -version
它告诉我我有1.8.0_25版本所以我认为我没有java的问题。现在,如果我尝试制作任何类型的项目,就会发生这种情况。 Eclipse打开向导以创建特定类型的新项目,然后整个应用程序崩溃。当我开始这样做时,我将它安装在KDE桌面下。当Eclipse崩溃时,我收到消息java: /build/buildd/gtk2-engines-oxygen-1.4.5/src/animations/oxygencomboboxdata.cpp:87: void Oxygen::ComboBoxData::setButton(GtkWidget*): Assertion '!_button._widget' failed
。因此,我决定安装xfce桌面以解决它,因为氧气是KDE主题。我卸载了eclipse并在xfce下重新安装它,我有相同的行为和相同的错误。当我从命令行运行eclipse时,我在启动时遇到此异常:
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
有没有人对还有什么想法尝试?
最佳解决办法
根据此错误报告中的评论20:https://bugs.eclipse.org/bugs/show_bug.cgi?id=440660#c20
This seems to be a bug in GTK according to https://bugs.launchpad.net/ubuntu/+source/gtk2-engines-oxygen/+bug/1242801 (there a similar problem for Meld was reported).
Another workaround mentioned there is for Oxygen, edit the normally already existing file
/usr/share/themes/oxygen-gtk/gtk-2.0/gtkrc
and change`GtkComboBox::appears-as-list = 1`
into
`GtkComboBox::appears-as-list = 0`
This workaround is working for me.