Table of Contents

Install Oracle java 8 on Debian 9 (Stretch)

Download tar.gz file from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Then:

mkdir /opt/java-jdk
tar -C /opt/java-jdk -zxf jdk-8u131-linux-x64.tar.gz
update-alternatives --install /usr/bin/java java /opt/java-jdk/jdk1.8.0_131/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/java-jdk/jdk1.8.0_131/bin/javac 1

Tested on

See also

References