Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to install JDK 7 on Ubuntu?

The installation should be with the tar archive.

I know the basic installation with the bin, but how to do with only a tar archive?

share|improve this question
up vote 0 down vote accepted

Generally when using a tar archive, you'd just add the path to the compiler executable in the extracted tar file to your $PATH variable, or if you're using an IDE like Eclipse, specify the compiler manually.

share|improve this answer

If you like the easy way you can use webupd8 java ppa, then there is no of installing it by the tar file:

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

Alter Install you can change the default java-version by

sudo update-alternatives --config java
share|improve this answer

The difference between .bin and tar archive is that, .bin is self extracting while tar archive will require you to use a third part application like "tar" command in linux to extract its contents.

To do so in extract a tar archive in ubuntu on command line type:-

tar xvf <tar-archive-filename>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.