Created
April 22, 2016 10:49
-
-
Save miroslavtamas/70c2760cc13013706f50e5ff376ef701 to your computer and use it in GitHub Desktop.
Install Oracle JDK 8u72 Linux x64 from command line on CentOS
This file contains hidden or 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
#!/bin/sh | |
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u72-b15/jdk-8u72-linux-x64.tar.gz" | |
tar xzf jdk-8u72-linux-x64.tar.gz | |
mkdir /usr/java | |
mv jdk1.8.0_72/ /usr/java/ | |
alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_72/bin/java 1 | |
alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_72/bin/javac 1 | |
alternatives --config java |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment