系统版本:centos6.8
JDK 版本:jdk1.8.0_111
eclipse版本:eclipse neon.1
问题描述:
【1】在xwindow界面可以正常启动eclipse
【2】在命令行界面用./eclipse命令启动eclipse的时候界面提示错误信息如下:
Eclipse:Can not open display
Eclipse:
GTK+ Version Check
Eclipse:Can not open display:
org.eclipse.m2e.logback.configuration:the org.eclipse.m2e.logback.configuration bundle was activited before the state location was initialized. will retry after the state location is initialized.
Eclipse:
An error has occured .see the log file
/home/setup/eclipse/configuration/1478687****.log
【3】上述步骤中日志文件打开如下:
!SESSION 2016-11-09 02:32:15.379 -----------------------------------------------
eclipse.buildId=4.6.1.M20160907-1200
java.version=1.8.0_111
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
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 2016-11-09 02:32:38.774
!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.(Device.java:174)
at org.eclipse.swt.widgets.Display.(Display.java:562)
at org.eclipse.swt.widgets.Display.(Display.java:553)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:789)
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)
【4】已使用方法
(1)
找到目录 eclipse/workspace/.metadata/.plugins/org.eclipse.ui.workbench 下面的 workbench.xml文件,删除在XML节点
对应的目录没有该xml文件,删除org.eclipse.ui.workbench文件重启eclipse也没有发现该文件重建