Installing Java on Linux

Share and Enjoy !

0 0

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..

Related posts

One Thought to “Installing Java on Linux

  1. Thanks for the post…….

    Could someone tell me how to use multithreading in applet…

Leave a Comment