简体   繁体   English

如何在Ubuntu 17.10下启动Eclipse Neon / Oxygen?

[英]How can I start Eclipse Neon/Oxygen under Ubuntu 17.10?

I use Ubuntu 17.10 with 我将Ubuntu 17.10与

java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

Since I upgraded from 17.04 to 17.04 I am not able to start eclipse. 由于我从17.04升级到17.04,因此无法启动Eclipse。 It always throw the exception: 它总是抛出异常:

!SESSION 2017-12-10 21:39:32.982
-----------------------------------------------
eclipse.buildId=4.6.3.M20170301-0400
java.version=1.8.0_151
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product
org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.osgi 4 0 2017-12-10 21:39:36.095
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4559)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:958)
at org.eclipse.swt.widgets.Display.create(Display.java:942)
at org.eclipse.swt.graphics.Device.<init>(Device.java:174)
at org.eclipse.swt.widgets.Display.<init>(Display.java:562)
at org.eclipse.swt.widgets.Display.<init>(Display.java:553)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:795)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:160)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:168)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:111)
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:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:673)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
at org.eclipse.equinox.launcher.Main.main(Main.java:1492)

I tried it with existing and fresh Eclipse Neon and Eclipse Oxygen. 我用现有的和新鲜的Eclipse Neon和Eclipse Oxygen进行了尝试。 Also I tried the tip 我也尝试过小费

--launcher.GTK_version
2

in eclipse.ini and 在eclipse.ini和

export SWT_GTK3=0

in the console before starting 在开始之前在控制台中

./eclipse

I have no clue what I can do to solve this. 我不知道该如何解决。

On older Ubuntu-Versions the trick with GTK3=0 worked well, but not now. 在较旧的Ubuntu版本上,使用GTK3 = 0的技巧效果很好,但现在不行。 Have you any idea? 你有什么主意吗

I correct myself. 我纠正自己。 I tried already with Oxygen.1a under Ubuntu 17.10. 我已经在Ubuntu 17.10下尝试使用Oxygen.1a。

I found a reason, but not not really understood it. 我找到了一个原因,但不是很了解。 The problem "only" occurs when i start eclipse from console as "root". 当我从控制台以“ root”身份启动Eclipse时,会出现“仅”问题。 If i not start eclipse with sudo everything works fine and eclipse not crashes. 如果我不使用sudo启动eclipse,那么一切正常,并且eclipse不会崩溃。

Since this combination (Ubuntu 17.10, Eclipse Neon/Oxygen) i did not have this problem. 由于这种组合(Ubuntu 17.10,Eclipse Neon / Oxygen),我没有这个问题。 Because i use a complex webapplication with a tomcat-webserver which is deployed and started out of eclipse it was easier to do everything in development as root. 因为我将一个复杂的Web应用程序与tomcat-webserver一起使用,该应用程序已部署并从Eclipse开始,所以更容易以root身份进行开发中的所有操作。

So i need to change my behaviour to get everything running. 所以我需要改变自己的行为以使一切正常运行。

So this topic is resolved. 因此,本主题已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM