Programming Tutorials

Installing Java on Linux

Installing Java on Linux (Ex. Using Ubuntu 12.04)

Java allows you to run cross-platform applications that can run on Mac OS-X, Linux, and Windows (among other OS’s) without modification. You can be Installing Java on Linux machine with minimal fuss, and there is the ways for all users regardless of technical knowledge. Just because you have a Linux computer doesn’t mean you have to miss out!
1) Download Java for Appropriate Linux Version
Ex:- Go to the given link and download the ‘ jdk-7u6-linux-i586.tar.qz ‘ for 32-bit Operating System and ‘ jdk-7u6-linux-x64.tar.gz ‘ for 64-bit Operating System
2) Save the file.
3) After saving, extract the downloaded package by running the commands below. This assumes that the package was downloaded in your Downloads folder.
tar -xvf ~/Downloads/jdk-7u6-linux-x64.tar.gz     -For 64-bit
tar -xvf ~/Downloads/jdk-7u6-linux-i586.tar.gz    -For 32-bit


Note: Use the following code to Install from any other Drive or path
4) Now enter the command and wait for the output..
5)  Now, create a folder for Java JDK files and folders by running the commands below.
sudo mkdir -p /usr/lib/jvm/jdk1.7.0
6) Then move all the JDK files and folders to the new location by running the commands below.
sudo mv jdk1.7.0_06/* /usr/lib/jvm/jdk1.7.0/
7) Next, copy and paste each command as shown below one-at-a-time to enable Java JDK. Remember to press Enter after each line.
  • sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
  • sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
  • sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1

8)  Congrats! java has been successfully installed in your computer.

9)  Now adding Mozilla Plugins..


Use the following command:-

i) Create a Mozilla plugins folder in your home directory.

mkdir ~/.mozilla/plugins/

ii) Finally, create a symbolic link to your Mozilla plugins folder.
Note: For 32-bit systems, replace amd64’ with ‘i386’ .
ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/amd64/ ~/.mozilla/plugins/

Enjoy The Programming..


My Parents call me Nishu, and I am registered in my death certificate as. . . Oh sorry, in my birth certificate as Nitish Andola. Friends Often Also Call Me as Andy. I hate people who act over smart. I don’t take lot of time to adjust with anybody. It’s my strength rather. I love to live with my friends. I love all those who feel comfortable with me and who make me feel comfortable with them… I always think positive, which have never helped me to achieve anything, but still it has become a habit. I forgive people soon, as I feel this life is too short and we have no time to prove others wrong. I love innovative things. And friends sometime call me as HiFi. I love to be Honest, and one thing I have observed about myself is, I am not a Fan, I believe there is good and bad in everyone and we need to embrace the good. I enjoy the company of people who are FREE. I too love to live freely! I like to interact with nature and am very much interested in adventure sports and fascinated by Astronomy. I respect each and every person on this earth, sometimes even things and like to be a free spirit. Some don't like that, but that's the way I am. I never think badly for anyone...

Related Articles

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button