About eclipse startup error in Ubuntu 12.04 LTS

After re-install Ubuntu 12.04 some-days ago it seems net and clean OS to me. When I first time using Ubuntu for long 6/7 months it was full of my errors of install software or mis-configure some issues. But this time I am aware of that so I feel comfortable with this and not mess-up anything. But today when i tried to install eclipse from software center then I found an error as follows,

An error has occurred. See the log file /home/tapan/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1335382319394.log .

And I checked the log file which says something like follows,

!SESSION 2012-08-18 00:09:17.714 ———————————————–
eclipse.buildId=I20110613-1736
java.version=1.7.0_06
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-08-18 00:09:24.236
!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/tapan/.swt/lib/linux/x86/libswt-gtk-3740.so
Can’t load library: /home/tapan/.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)
and so on….

I tried to re-install the software but it was same. Then I google this issues and came to know that if i use open jdk then it will be ok. But I was not wiling to install open jdk when I have oracle jdk 1.7
so after google for some workaround and I found to know that if I copy all the files from /usr/lib/jni to ~/.swt/lib/linux/x86 then it would be fine. So i did as follows,

sudo cp /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86/

And now I can run eclipse smoothly.

(Visited 137 times, 1 visits today)

2 Comments

  1. dminones September 17, 2012 at 4:56 AM

    Thanks!!! You solve my problem

    1. Tapan Kumer Das October 15, 2012 at 3:49 PM

      You are welcome and i am glad that someone somewhere get help from me 🙂

Leave a comment

Your email address will not be published. Required fields are marked *