无法在Ubuntu中打开Eclipse 12.04 - java.lang.UnsatisfiedLinkError:无法加载SWT库 [英] Can't OPEN Eclipse in Ubuntu 12.04 - java.lang.UnsatisfiedLinkError: Could not load SWT library

查看:205
本文介绍了无法在Ubuntu中打开Eclipse 12.04 - java.lang.UnsatisfiedLinkError:无法加载SWT库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近安装了Ubuntu 12.04。另外我安装了Java 7.我尝试安装eclipse-java-indigo-SR2-linux-gtk.tar.gz。我在/ home / ramprabhu位置提取了这个文件。然后我尝试运行eclipse可执行文件。我看到日志文件时出错。



我的日志文件

  !SESSION 2012-06-10 22:47:35.959 -------------------------------------- --------- 
eclipse.buildId = M20120208-0800
java.version = 1.7.0_04
java.vendor = Oracle Corporation
BootLoader常量:OS = linux,ARCH = x86,WS = gtk,NL = en_US
框架参数:-product org.eclipse.epp.package.java.product
命令行参数:-os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.osgi 4 0 2012-06-10 22:47:36.757
!MESSAGE应用程序错误
!STACK 1
java.lang.UnsatisfiedLinkError:无法加载SWT库。原因:
/home/ramprabhu/eclipse/configuration/org.eclipse.osgi/bundles/247/1/.cp/libswt-pi-gtk-3740.so:libXtst.so.6:无法打开共享对象文件:没有这样的文件或目录
否java.library.path中的swt-pi-gtk
/home/ramprabhu/.swt/lib/linux/x86/libswt-pi-gtk-3740.so :/home/ramprabhu/.swt/lib/linux/x86/libswt-pi-gtk-3740.so:错误的ELF类:ELFCLASS64(可能的原因:架构字宽度不匹配)
无法加载库:/在/ etc / b在org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
在org.eclipse.swt.internal.gtk.OS。< clinit>(OS.java:22)
在org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
在org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
在org .eclipse.swt.widgets.Display。< clinit>(Display.java:132)
在org.eclipse.ui .internal.Workbench.createDisplay(Workbench.java:695)
在org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
在org.eclipse.ui.internal.ide.application .IDEApplication.createDisplay(IDEApplication.java:153)
在org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
在org.eclipse.equinox.internal .app.EclipseAppHandle.run(EclipseAppHandle.java:196)
在org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
在org.eclipse.core .runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
在org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
在org.eclipse .core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 57)
at s un.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect.Method.invoke(Method.java:601)
在org.eclipse.equinox.launcher.Main。 invokeFramework(Main.java:622)
在org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
在org.eclipse.equinox.launcher.Main.run(Main。 java:1410)

我无法运行eclipse。如何解决这个问题并运行eclipse。

解决方案

你正在混合64位和32位。下载64位版本的Eclipse,并使用64位版本的Java 7。


I have installed Ubuntu 12.04 newly. Also i installed Java 7. I try to install eclipse-java-indigo-SR2-linux-gtk.tar.gz. i extracted this file in /home/ramprabhu location. Then i try to run eclipse executable file. I got error as see the log file.

My log file:

 !SESSION 2012-06-10 22:47:35.959 -----------------------------------------------
eclipse.buildId=M20120208-0800
java.version=1.7.0_04
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.osgi 4 0 2012-06-10 22:47:36.757
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
    /home/ramprabhu/eclipse/configuration/org.eclipse.osgi/bundles/247/1/.cp/libswt-pi-gtk-3740.so: libXtst.so.6: cannot open shared object file: No such file or directory
    no swt-pi-gtk in java.library.path
    /home/ramprabhu/.swt/lib/linux/x86/libswt-pi-gtk-3740.so: /home/ramprabhu/.swt/lib/linux/x86/libswt-pi-gtk-3740.so: wrong ELF class: ELFCLASS64 (Possible cause: architecture word width mismatch)
    Can't load library: /home/ramprabhu/.swt/lib/linux/x86/libswt-pi-gtk.so

    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
    at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
    at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
    at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
    at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
    at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
    at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
    at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
    at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

I am not able to run eclipse. How to solve this problem and run eclipse.

解决方案

You are mixing 64-bit and 32-bit. Download the 64-bit version of Eclipse and use the 64-bit version of Java 7.

这篇关于无法在Ubuntu中打开Eclipse 12.04 - java.lang.UnsatisfiedLinkError:无法加载SWT库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆