Created
March 30, 2018 11:56
-
-
Save thatwist/9206ed872bd567f9b8dbe399f92c5519 to your computer and use it in GitHub Desktop.
Install Oracle Java Unix / ARM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like webupd8 team has dropped support of java8 debian repo - in the need to automate java installation I've created following script