As mentioned here, by running this command you can install Java 7 JRE.
$ sudo apt-get install openjdk-7-jre
But sometimes I can't find the package in the official repository of Ubuntu even after updating my /etc/apt/sources.list . Am I the only one who has this problem or is it a problem in my version of Ubuntu.