Pages

Saturday, June 2, 2012

Ubuntu 12.04 & Eclipse

I use Ubuntu at work for development, mostly with Jetbrains IntelliJ IDEA these days, I was surprised when I tried to fire up Eclipse for the first time in a while that I couldn't do so.  The error I was getting was
An error has occurred. See the log file /home/wittk/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1338578313816.log
Here's an excerpt from the log mentioned in the message:
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/wittk/.swt/lib/linux/x86/libswt-gtk-3740.so
 Can't load library: /home/wittk/.swt/lib/linux/x86/libswt-gtk.so

The solution is to link the swt library files to the location it is looking.  This solution was mentioned here.  Just run the commands below.
cd ~/.swt/lib/linux/x86*
for file in /usr/lib/jni/libswt-*3740.so; do ln -s ${file}; done

6 comments:

  1. I gave up on the Ubuntu version of eclipse and opted (no pun intended) to install eclipse as add-on software. I was surprised and delighted at how easy it was, how much better it works and how there have been absolutely no issues since I made the switch. My process (which mirrors the process of so many other users) is here:
    http://poquitopicante.blogspot.com/2012/11/eclipse-in-ubuntu.html
    Give it a try!

    ReplyDelete