Redhat启动eclipse报错 Eclipse: 无法打开显示

在Redhat下安装eclipse时,按网上的方法下载eclipse的tar.gz文件后,解压,在终端执行"./eclipse"时发生报错,内容如下:

No protocol specified
Eclipse: 无法打开显示:
No protocol specified
No protocol specified
Eclipse: 无法打开显示:
Eclipse:
An error has occurred. See the log file
/mnt/hgfs/vmware share/eclipse/configuration/1393155397642.log.

1393155397642.log的内容是:

!SESSION 2014-02-23 19:36:37.202 -----------------------------------------------
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=zh_CN
Framework arguments:  -product org.eclipse.epp.package.cpp.product options openFile
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product options openFile

!ENTRY org.eclipse.osgi 4 0 2014-02-23 19:36:41.185
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
        at org.eclipse.swt.SWT.error(SWT.java:4423)
        at org.eclipse.swt.widgets.Display.createDisplay(Display.java:925)
        at org.eclipse.swt.widgets.Display.create(Display.java:909)
        at org.eclipse.swt.graphics.Device.(Device.java:156)
        at org.eclipse.swt.widgets.Display.(Display.java:507)
        at org.eclipse.swt.widgets.Display.(Display.java:498)
        at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:691)
        at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162

......

解决方法其实很简单

在保证jdk安装正确的前提下,要通过双击压缩包中的“eclipse”执行程序就可以了,就像windows下那样运行程序一样,而不是在终端下通过命令的方式执行。



你可能感兴趣的:(Redhat启动eclipse报错 Eclipse: 无法打开显示)