How to install Oracle JDK 7 in Ubuntu Server 12.04 via apt-get command line?

# Step 1: Add the repository for JDK 7.
sudo apt-add-repository ppa:webupd8team/java

# Step 2: Update
sudo apt-get update

# Step 3: Install JDK and associated utilities
sudo apt-get install oracle-java7-installer

# Step 4: Set the default java interpreter used by the system.
sudo update-alternatives --config java

References:

Advertisements

One thought on “How to install Oracle JDK 7 in Ubuntu Server 12.04 via apt-get command line?

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s