When i upgraded to ubuntu 11.10(oneiric Ocelot) i have noticed that there is no any jdk installed in default. But it is good as previous ubuntu versions have OpenJdk in default. I am preffer to use Oracle(sun) jdk instead of OpenJdk for some reasons. Therefore i have to first uninstall Openjdk and then install Oracle(sun) jdk in those versions. Thanks to ubuntu developers in ubuntu 11.10 i don't need to uninstall OpenJdk to install Oracle jdk.
Here are the steps you need to install Oracle jdk 1.7 on ubuntu 11.10
Step 1. Download Oracle jdk 1.7 form here
Step 2. Extract it to your home folder and move to usr/lib/jvm/
open terminal(ctrl+Alt+T)
(assume that extracted folder name is "java_1.7" now we need to move this folder to usr/lib/jvm)
shameera@dell:~$ sudo mv java_1.7/ usr/lib/jvm/
Step 3. Install Update Java package created by Bruce Ingalls (packages available for Ubuntu 11.10, 11.04, 10.10 and 10.04)
shameera@dell:~$ sudo add-apt-repository ppa:nilarimogard/webupd8
shameera@dell:~$ sudo apt-get update
shameera@dell:~$ sudo apt-get install update-java
Step 4. To install oracal jdk 1.7 run following command in terminal
shameera@dell:~$ sudo update-java
after this you have installed java-1.7-oracal successfully for
you can check version by running "java -version" in terminal then you will see an output like this(my os is 64 bit if your one is 32 bit then this will different little bit)
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
It means you have installed jdk 1.7 on your machine successfully
first remove old firefox java plugin
shameera@dell:~$ rm -f ~/.mozilla/plugins/libnpjp2.so ~/.mozilla/plugins/libjavaplugin_oji.so
shameera@dell:~$ sudo rm -f /usr/lib/firefox/plugins/libnpjp2.so /usr/lib/firefox/plugins/libjavaplugin_oji.so
for 32bit :-
shameera@dell:~$ mkdir -p ~/.mozilla/plugins
shameera@dell:~$ ln -s /usr/lib/jva/java_1.7/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
for 64bit :-
shameera@dell:~$ mkdir -p ~/.mozilla/plugins
shameera@dell:~$ ln -s /usr/lib/jvm/java_1.7/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/
Here are the steps you need to install Oracle jdk 1.7 on ubuntu 11.10
Step 1. Download Oracle jdk 1.7 form here
Step 2. Extract it to your home folder and move to usr/lib/jvm/
open terminal(ctrl+Alt+T)
(assume that extracted folder name is "java_1.7" now we need to move this folder to usr/lib/jvm)
shameera@dell:~$ sudo mv java_1.7/ usr/lib/jvm/
Step 3. Install Update Java package created by Bruce Ingalls (packages available for Ubuntu 11.10, 11.04, 10.10 and 10.04)
shameera@dell:~$ sudo add-apt-repository ppa:nilarimogard/webupd8
shameera@dell:~$ sudo apt-get update
shameera@dell:~$ sudo apt-get install update-java
Step 4. To install oracal jdk 1.7 run following command in terminal
shameera@dell:~$ sudo update-java
after this you have installed java-1.7-oracal successfully for
you can check version by running "java -version" in terminal then you will see an output like this(my os is 64 bit if your one is 32 bit then this will different little bit)
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
It means you have installed jdk 1.7 on your machine successfully
Install oracal java 7 browser plugin for Firefox
first remove old firefox java plugin
shameera@dell:~$ rm -f ~/.mozilla/plugins/libnpjp2.so ~/.mozilla/plugins/libjavaplugin_oji.so
shameera@dell:~$ sudo rm -f /usr/lib/firefox/plugins/libnpjp2.so /usr/lib/firefox/plugins/libjavaplugin_oji.so
for 32bit :-
shameera@dell:~$ mkdir -p ~/.mozilla/plugins
shameera@dell:~$ ln -s /usr/lib/jva/java_1.7/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/
for 64bit :-
shameera@dell:~$ mkdir -p ~/.mozilla/plugins
shameera@dell:~$ ln -s /usr/lib/jvm/java_1.7/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/