Most of the people really face the problem to install JDK first time on Ubuntu.Some people just don't like to use openJDK and some people just want to uninstall openJDK.If you think like this then this blog is for you.
OpenJDK and JDK can stay side by side and you may grab which one you like to use.If you just like to install openJDK, it is pretty straight forward.Go to Ubuntu Software Centre and type openJDK.You can easily install.But to insatll JDK by Oracle, you have to work a bit.
Step 1:
Download the latest Oracle JDK 7 from HERE
Step 2:
Double click to extract the downloaded Oracle Java JDK archive in your home folder and rename the newly created folder to "java-7-oracle"
Step :3
move the renamed Java-7-oracle to /usr/lib/jvm/
In case if your system does not have the desire destination, please perform the following command:
Step 4:
Install Update Java package created by Bruce Ingalls (packages available for Ubuntu 11.10, 11.04, 10.10 and 10.04)
type the following command to select JVM
OpenJDK and JDK can stay side by side and you may grab which one you like to use.If you just like to install openJDK, it is pretty straight forward.Go to Ubuntu Software Centre and type openJDK.You can easily install.But to insatll JDK by Oracle, you have to work a bit.
Step 1:
Download the latest Oracle JDK 7 from HERE
Step 2:
Double click to extract the downloaded Oracle Java JDK archive in your home folder and rename the newly created folder to "java-7-oracle"
Step :3
move the renamed Java-7-oracle to /usr/lib/jvm/
In case if your system does not have the desire destination, please perform the following command:
sudo mkdir -p /usr/lib/jvm/ sudo mv java-7-oracle/ /usr/lib/jvm/The first command will make a directory if does not exist and the second command will move the renamed java-7-oracle folder to the destination.
Step 4:
Install Update Java package created by Bruce Ingalls (packages available for Ubuntu 11.10, 11.04, 10.10 and 10.04)
sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo apt-get install update-javaStep 5:
type the following command to select JVM
sudo update-javaTo check that the Oracle JDK is installed or not perform:
java -version
Post a Comment