centOS6.8启动eclipse失败

从官网下载的Linux版本的软件解压后运行时报错,下面是错误信息

!SESSION 2020-05-21 01:47:43.790 -----------------------------------------------
eclipse.buildId=4.15.0.I20200305-0155
java.version=1.8.0_161
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=zh_CN
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 2020-05-21 01:47:47.596
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    no swt-pi4-gtk-4932r18 in java.library.path
    no swt-pi4-gtk in java.library.path
    Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi4-gtk-4932r18.so
    Can't load library: /root/.swt/lib/linux/x86_64/libswt-pi4-gtk.so

    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:342)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:256)
    at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:90)
    at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:209)
    at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:155)
    at org.eclipse.swt.widgets.Display.<clinit>(Display.java:164)
    at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:760)
    at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:166)
    at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:180)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    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:657)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1447)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1420)

百度后说是让我安装libswt-pi-gtk.so相关的包。使用下面指令安装重启后还是报的同样的错误

yum install gtk2.i686 gtk2-engines.i686 PackageKit-gtk-module.i686 PackageKit-gtk-module.x86_64 libcanberra-gtk2.x86_64 libcanberra-gtk2.i686

1个回答

SchemingCat
SchemingCat 连接里的问题是因为JDK安装和环境变量造成的,而我使用java -version是可以查看到JDK版本的。所以他的解决方法应该不起作用
4 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问