ubuntu eclipse启动不了了

icheer 发布于 2012/07/13 17:26
阅读 3K+
收藏 0

具体情况是,Ubuntu 默认的JDK是open-jdk,我把它删除了,然后自己安装的最新的JDK1.7.0_05,路径也改了,安装在了/usr/lib/jvm/jdk1.7.0_05,但是这样以来eclipse启动不了了,报错如下,

!SESSION 2012-07-13 17:16:23.801 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86

!ENTRY org.eclipse.osgi 4 0 2012-07-13 17:16:25.102
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
        no swt-gtk-3740 in java.library.path
        no swt-gtk in java.library.path
        Can't load library: /home/ymy/.swt/lib/linux/x86/libswt-gtk-3740.so
        Can't load library: /home/ymy/.swt/lib/linux/x86/libswt-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.C.<clinit>(C.java:21)
        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)
                                                              1,1           Top
---------------------------------------------------------------------

我猜应该是安装了新的JDK引起的问题,我看了下/home/ymy/.swt/lib/linux/x86/下面,只有libswt-gtk-3740.so,没有libswt-gtk.so,请问怎么解决,谢谢

加载中
0
情天大圣
情天大圣

引用来自“摩羯座”的答案

yes,我已经自己找到解决办法了,如下:

on  Ubuntu 12.04 32 bit.

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/ 

And on Ubuntu 12.04 64 bit try:

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/ 

网上答案一大堆,为什么还要来问呢?

 

Try with the following command

    64 Bits System: ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

    32 Bits System: ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/

情天大圣
情天大圣
回复 @摩羯座 : 所以你这次序有问题,先解决,解决不了再问!
icheer
icheer
是啊,我先问了再去网上找的答案,结果发现网上答案一大堆
0
icheer
icheer

yes,我已经自己找到解决办法了,如下:

on  Ubuntu 12.04 32 bit.

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86/ 

And on Ubuntu 12.04 64 bit try:

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/ 
返回顶部
顶部