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


How To 4477881162395213656

Post a Comment

  1. Very Good.

    Just one observation, to

    Ubuntu 13.04 64bits:

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

    Thanks for share.

  2. Thanks for sharing such informative article on Java technology. It is most preferred technology among developers to create stunning mobile application fast and easy. It also created massive career opportunity for aspiring professionals. JAVA Training

  3. Very present article. I gain knowledge about how to install java on linux program. It' useful from me.
    Best Embedded Systems Training in Chennai | C & C++ Training Institute in Chennai | No.1 Embedded Training in Chennai

  4. I enjoy what you guys are usually up too. This sort of clever work and coverage! Keep up the wonderful works guys I’ve added you guys to my blog roll..,

    white label website builder

    mobile website builder




Follow Us On