Skip to content

Instantly share code, notes, and snippets.

@thatwist
Created March 30, 2018 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thatwist/9206ed872bd567f9b8dbe399f92c5519 to your computer and use it in GitHub Desktop.
Save thatwist/9206ed872bd567f9b8dbe399f92c5519 to your computer and use it in GitHub Desktop.
Install Oracle Java Unix / ARM
#!/usr/bin/env bash
wget --no-cookies \
--no-check-certificate \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-linux-arm64-vfp-hflt.tar.gz" \
-O jdk-8u162-linux-arm64.tar.gz
tar -xzvf jdk-8u162-linux-arm64.tar.gz
sudo mkdir /usr/lib/jvm
sudo mv ./jdk1.8* /usr/lib/jvm/jdk1.8.0
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
echo 'JAVA_HOME="/usr/lib/jvm/jdk1.8.0"' | sudo tee -a /etc/environment > /dev/null && source /etc/environment && echo $JAVA_HOME
sudo rm jdk-8*
@thatwist
Copy link
Author

thatwist commented Mar 30, 2018

Looks like webupd8 team has dropped support of java8 debian repo - in the need to automate java installation I've created following script

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