Clean way to install Oracle JDK on ubuntu

There are several ways to install JDK on linux and there are several JDK versions available for ubuntu. But as my personal choice I would prefer Oracle JDK the most.

Basically there are two main ways to install JDK on ubuntu
Download JDK linux package and install it
Add the repository containing oracle JDK packages and install using “apt-get”

I’ll be focusing on the second method since it’s a more clean way to install, that it will install the packages to the most suitable locations. Obviously we can install it to our preferred location following the first method but if we are configuring a production server it is recommended to follow the standard locations to which the JAVA like environments should be installing.

This is all you have to do (See this is simpler than the first method)

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java7-installer


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s