Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rsporteman/f85e70e502db9067f1c45df9bbd8f8d0 to your computer and use it in GitHub Desktop.
Save rsporteman/f85e70e502db9067f1c45df9bbd8f8d0 to your computer and use it in GitHub Desktop.
Install Java JDK SE Development Kit 8 On Debian 9 Stretch (for x86_64 - amd64)

Install Java JDK SE Development Kit 8 On Debian 9 Stretch (for x86_64 - amd64)

Use root user

su -

Download jdk, check last version

wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz

Extract

tar -zxvf jdk-8u*-linux-*.tar.gz
rm jdk-8u*-linux-*.tar.gz

Make JDK Folder

mkdir /usr/java/

Move JDK Files

mv jdk1.8.*/* /usr/java/

Install Java

update-alternatives --install /usr/bin/java java /usr/java/bin/java 200000

Install Java Compiler

update-alternatives --install /usr/bin/javac javac /usr/java/bin/javac 200000

Check instalation

java -version
javac -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment