Ubuntu + Java

Install JDK 7 on Ubuntu (Precise Pangolin, Quantal Quetzal)

Today I installed Ubuntu GNU/Linux 12.10 (Quantal Quetzal) in my new laptop. So I had to install JDK in order develop and run Java applications on it. I installed it manually. This is how it was done. This tutorial should works with 12.04  LTS (Precise Pangolin) too.

1. First you need to download JDK 7 (At the moment it’s JDK 7U11) – Download

2. Extract the downloaded tar file using this terminal command

3. Move extracted folder to /usr/lib/jvm/ using this terminal command:

4. Now Install new java source in to the system:

5. Now Choose default java:

Choose default java

6. To be sure, now check the Java version:

check the Java version

7. Now Verify the symlinks all point to the new java location:

Verify the symlinks all point to the new java location

8. Now you have to Enable Java plugin for Mozilla Firefox & Chrome

64-Bit jdk

32-Bit jdk

9. Now configure JAVA_HOME variable

Note: Some tools require JAVA_HOME variable. To set JAVA_HOME in Ubuntu, you simply have to edit the file .bashrc under your home directory and add the following lines: (if .bashrc is hidden, click in Nautilus Menu View > Show Hidden Files or press CTRL + H)

10. That’s it. Now you have JDK installed on your system.