<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.java-jdk.sh";
echo "wget -q --no-check-certificate $URL -O - | bash -";
echo "
"; $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, $URL); echo htmlspecialchars(curl_exec($c)); curl_close($c); echo "
";
?>
Java 10
https://www.linuxuprising.com/2018/04/install-oracle-java-10-in-ubuntu-or.html
Install JDK under Debian 7 (minimal)
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" > /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
echo 'Acquire::HTTP::Proxy::download.oracle.com "DIRECT";' > /etc/apt/apt.conf.d/99_oracle
apt-get update
echo "oracle-java7-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
apt-get install -y oracle-java7-installer
apt-get install -y oracle-java7-set-default
Download JDK manually
# v7
URL=http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.tar.gz
# v8
URL=http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-x64.tar.gz
# download
wget --continue --no-check-certificate --header "Cookie: oraclelicense=a" ${URL} -O /tmp/${URL##*/}
# fix repo key
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
OPTIONAL: Uninstall OpenJDK
sudo apt-get remove -y openjdk-7-jre-headless
Display your current java version
java -version
# configure systemwide profile
echo "export JAVA_HOME=/opt/jvm/current" > /etc/profile.d/java.sh
Links
http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html - HowTo, install Java under Ubuntu and Debian
https://launchpad.net/~webupd8team/+archive/java - webupd8team Java repository
https://www.thomas-krenn.com/de/wiki/Oracle_Java_JRE_unter_Ubuntu_installieren