Hi, this is my first post to this blog, I just installed Ubuntu 14.04 LTS. And it has been a great experience. But I will dig more about my install experiences at another time.
Ok let's see how to install Oracle JDK 1.6. Beware that this is Oracle JDK and not Open JDK.
First download jdk1.6 here.
You will get a file like this one: jdk-6u45-linux-x64.bin. Then open a terminal and go to you downloads directory.
1. Give execution privilege to the file:
$ chmod a+x jdk-6u45-linux-x64.bin
2. Run file to extract contents.
$ ./jdk-6u45-linux-x64.bin
3. Move jdk to /usr/lib/jvm
$ sudo mv jdk1.6.0_45 /usr/lib/jvm
4. Create Symbolik Link
$ sudo ln -s /usr/lib/jvm/jdk1.6.0_45/ /usr/lib/jvm/jdk1.6
5. Change group and owner.
$ sudo chown root:root -R /usr/lib/jvm/jdk1.6.0_45/
6. Add variables to global profile, first edit your profile with your favorite editor
$ sudo vi /etc/profile
Add this at the end:
export JAVA_HOME=/usr/lib/jvm/jdk1.6 export JRE_HOME=$JAVA_HOME/jre export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
7. (Optional) Create Symbolic Links
$ sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6/bin/java 100 $ sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6/bin/javac 100 $ sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.6/bin/javaws 100
And that's it. You can test your installation with the following commands.
$ java -version $ javac -version $ javaws -viewer
Update 2015-07-04
Today I followed this guide using JDK 1.5 (jdk-1_5_0_22-linux-amd64.bin) and everything was fine.
Update 2015-07-31
Today I followed this guide using JDK 1.8 (jdk-8u45-linux-x64.tar.gz) and everything was fine. The only difference insetead of running a .bin file you need to run:
$ tar -xvzf jdk-8u45-linux-x64.tar.gz
I am very glad to thank you for such kind of rich and informative blog.i really enjoyed while reading your ideas.
ReplyDeleteQtp training in Chennai
iOS Training in Chennai
JAVA Training in Chennai
Big Data Training in Chennai
Selenium Training in Chennai
German Classes in chennai
SEO Training in Chennai
Selenium Course in Chennai
Harrahs Casino - Jordan 16 Retro
ReplyDeleteHarrahs Casino air jordan 18 retro yellow suede super has a huge range of slot machines in the show to buy air jordan 18 retro men blue rooms. They have air jordan 18 retro men blue on sale a selection 슈어뱃 of over 700 titles that have different types of game. You can play at Harrah's jordan 18 white royal blue great site