Eclipse cannot load SWT libraries
on my Ubuntu 12.04 32 bit. I edit the command to:
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/
Simply specify the path to the libraries:
echo "-Djava.library.path=/usr/lib/jni/" >> /etc/eclipse.ini
In my case, I was missing the /usr/lib/jni
directory entirely. Fixed by
sudo apt-get install libswt-gtk-3-jni libswt-gtk-3-java
No need to symlink afterwards. Eclipse started normally.
SOLVED:
Because I had installed the Oracle Java 7 it had changed the default Java to Oracle Java 7, however it needed to be the Open JDK.
To fix, open up terminal and type
sudo update-alternatives --config java
This brings up a list of the different types of Java. Simply select the Open JDK.