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?
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
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.
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>