debian install java
sudo apt-get install openjdk-8-jdk# If you want java 11:
sudo apt install default-jre
# If you want java 8:
sudo apt update
sudo apt install apt-transport-https ca-certificates wget dirmngr gnupg software-properties-common
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
sudo apt update
sudo apt install adoptopenjdk-8-hotspotecho deb http://archive.debian.org/debian jessie-backports main | sudo tee /etc/apt/sources.list.d/jessie-backports.list
echo 'Acquire::Check-Valid-Until "false";' | sudo tee -a /etc/apt/apt.conf
sudo apt update
sudo apt -t jessie-backports install openjdk-8-jre
sudo update-java-alternatives -s java-8-oracle
export JAVA_HOME=/usr/lib/jvm/java-8-oracle/
export PATH=$PATH:$JAVA_HOME
123