How to install JDK in Ubuntu

Those who are involved in Java based application development must need to use Java Development Kit (JDK). And those are newbie in the world of Ubuntu may don’t know how to install JDK in Ubuntu. This is quite simple to install JDK in ubuntu. Just run the following command in the terminal and follow the steps.

$sudo apt-get install sun-java5-jdk

After this the rest of the process will display a dialog that will require you to accept the license agreement. When you do, the rest of the setup will happen on its own.

When you’re on the command prompt type

javac -version

or

java -version

Now you should be ready to work with Java.