Install Java JRE

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.java-jre.sh";
echo "wget $URL -O - | bash -";
echo "

";
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
echo htmlspecialchars(curl_exec($c));
curl_close($c);
echo "

";
?>

Download Oracle Java JRE & JDK using a script
https://ivan-site.com/2012/05/download-oracle-java-jre-jdk-using-a-script/

Fix mozilla java plugin
JAVA_HOME=/usr/lib/jvm/jdk1.7.0
MOZILLA_HOME=~/.mozilla
mkdir $MOZILLA_HOME/plugins
ln -s $JAVA_HOME/jre/lib/i386/libnpjp2.so $MOZILLA_HOME/plugins
or
ln -s $JAVA_HOME/jre/lib/amd64/libnpjp2.so $MOZILLA_HOME/plugins
or
ln -s /usr/lib/jvm/java-7-oracle/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

Links
http://wiki.ubuntuusers.de/make-jpkg
https://github.com/flexiondotorg/oab-java6 - Create a local apt repository for Sun Java 6 and/or Oracle Java 7 packages.
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
http://www.webupd8.org/2011/03/install-java-in-ubuntu-1104-natty.html
http://www.sysadminslife.com/linux/howto-oracle-sun-java-7-installation-unter-debian-6-squeeze/