With the suspension of support for more Ubuntu friendly format from Oracle we sometime face issues with installing Oracle Jdk 7 on ubuntu.I have a 64 bit oracle JDK installed on my system from the following PPAPPA: http://ppa.launchpad.net/webupd8team/java/ubuntuyou need to perform the following steps for installing the oracle JDK7 on your ubuntu 12.04 64 bit system1. $> sudo add-apt-repository ppa:webupd8team/java2. $> sudo apt-get update3. $> sudo apt-get install oracle-java7-installerAfter this you can check and select which java version you would like to use on the system$>sudo update-alternatives --config javaOnce this is done you probably would like to ensure that browser is using this java plugin, for that you need to carry out these optionscreate a "plugins" directory in the "~/.mozilla" path$> mkdir ~/.mozilla/pluginsNow you need to have a soft link to the actual file, which will be responsible for running the java on your browser(mozilla/chrome/chromium all use this plugins directory)$>ln -s /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so ~/.mozilla/pluginsOnce this is done you check the oracle link Test Page to see if the java is running fine on your systemNow you would probably like to run eclipse on your system, for that these is a catch. I was facing issues when i was trying to open eclipse form my system and was getting this errorjava.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:no swt-gtk-3740 in java.library.pathno swt-gtk in java.library.pathWhat this means is that the .swt folder at your home directory is missing few files which you need to manually copy. First you need to have following packages installed(generally they are installed if you have Gnome 3)
$> sudo apt-get install libswt-gtk-3-jni libswt-gtk-3-javaOnce you have installed these packages you can proceed to copy files which are needed$> sudo cp /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86_64In case its a i386 install then the command will be$> sudo cp /usr/lib/jni/libswt-*3740.so ~/.swt/lib/linux/x86You could also create the soft link to required fileslibswt-atk-gtk-3740.so -> /usr/lib/jni/libswt-atk-gtk-3740.solibswt-cairo-gtk-3740.so -> /usr/lib/jni/libswt-cairo-gtk-3740.solibswt-awt-gtk-3740.so -> /usr/lib/jni/libswt-awt-gtk-3740.solibswt-gnome-gtk-3740.so -> /usr/lib/jni/libswt-gnome-gtk-3740.solibswt-glx-gtk-3740.so -> /usr/lib/jni/libswt-glx-gtk-3740.solibswt-gtk-3740.so -> /usr/lib/jni/libswt-gtk-3740.solibswt-webkit-gtk-3740.so -> /usr/lib/jni/libswt-webkit-gtk-3740.solibswt-pi-gtk-3740.so -> /usr/lib/jni/libswt-pi-gtk-3740.soOnce this is done you need to edit the eclipse.ini file to explicitly tell eclipse which VM to use. If you have installed eclipse using the Ubuntu Software Center you need to go to the following path to edit the file$> sudo gedit /usr/lib/eclipse/eclipse.iniYou can specify the VM by adding these lines in the file-vm/usr/lib/jvm/java-7-oracle/bin
Once all these steps are done you should be ready with starting your development in Java on Ubuntu 12.04 64bit.
askubuntu.com : http://askubuntu.com/questions/125150/unsatisfied-link-error-and-missing-so-files-when-starting-eclipse
technonstop.com : http://technonstop.com/install-java-plugin-ubuntu-linux
Stackoverflow.com : http://stackoverflow.com/questions/10165693/ubuntu-eclipse-cannot-load-swt-libraries-not-opening