Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

3 Answers 3

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
add comment

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

http://www.webupd8.org/2013/06/oracle-releases-java-7-update-25-7u25.html

Alter Install you can change the default java-version by

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

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
add comment

Your Answer

 
discard

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.