Install Java JDK On Ubuntu 12.04/12.10/13.04/13.10

Most of the developers uses linux as their default operating system . Java is a popular programming language developed by Oracle Sun .Follow this simple steps to install Java on your system.

Before taking tour of Java in your system one has to install JRE for running Java & JDK i.e. development kit for building Apps.

Installing Java JDK ( Any Version ) On Ubuntu :-

1.) Download Java JDK tarball from the above link .

Java JDK for X86 ( 32 Bit ) Systems

Java JDK for x64 ( 64 Bit ) Systems

2.) Move the above download tarball to the home directory .

3.) Open Terminal ( CTRL+ALT+T) & Execute the following code :

tar -xvf  jdk-7u21-linux-i586.tar.gz  for 32 Bit

tar -xvf  jdk-7u21-linux-x64.tar.gz   for 64 Bit

After this execute :

sudo mkdir -p /usr/lib/jvm/jdk1.7.0

sudo mv jdk1.7.0_21/* /usr/lib/jvm/jdk1.7.0

 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

 mkdir ~/.mozilla/plugins/

ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/i386/ ~/.mozilla/plugins/

4. After this , You’ve successfully install Java Development Kit & Java Runtime Environment.

To Check The Installation :

  • Open The Terminal (CTRL+ALT+T)
  • Type ”  Java -version  “
Java JDK Install
  • Then Type ” Javac ” for running java.


Java JDK Install


If you are unable to install , this might be due to your Java JDK version is different from us . So, if you are using another version , simply replace our code having ” jdk1.7.0_21 ” with your version

If you have any query or doubt post a comment  below. your query will be solved immediately !.

(Visited 4 times, 1 visits today)