How to install Oracle JDK 7 on ubuntu 12.10
To install Oracle JDK 7 on ubuntu 12.10
1.Go to Oracle JDK7 download page. And download the latest linux jdk in .tar.gz format.
Here its (32 bit) jdk-7u11-linux-i586.tar.gz.
2.Copy your JDK .tar.gz file to your Desktop.
3.Open Terminal.To open terminal click the Dash home from unity launcher.And type terminal in the search field.And click Terminal.
4.Type the below code in terminal and hit enter to extract in Home folder.
tar -xvf ~/Desktop/jdk-7u11-linux-i586.tar.gz
5.Next Type below command in terminal to create a new folder.
sudo mkdir -p /usr/lib/jvm/jdk1.7.0
Type your ubuntu password if needed and press enter.
6.Now type below command to move files.
sudo mv jdk1.7.0_11/* /usr/lib/jvm/jdk1.7.0/
Note:change this (jdk1.7.0_11) according to your jdk version.
Example: for JDK 7 update 12 use jdk1.7.0_12
7.Type below command in terminal and hit enter.
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
8.Then type below command in terminal and hit enter.
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
9.Then type below command in terminal and hit enter.
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
10.After the successful installation,to check the installed version type
java -version
Pingback: How to install Netbeans IDE on ubuntu 12.10 | CONNECTwww.com