Last active
August 29, 2015 13:56
-
-
Save masbog/8839696 to your computer and use it in GitHub Desktop.
Change OpenJDK to OracleJDK 8 (CentOS 6)
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
| yum -y remove java-1.6.0-openjdk | |
| wget --no-cookies \ | |
| --no-check-certificate \ | |
| --header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
| "http://download.oracle.com/otn-pub/java/jdk/8-b132/jdk-8-linux-x64.rpm" \ | |
| -O /opt/jdk-8-linux-x64.rpm | |
| rpm -Uvh /opt/jdk-8-linux-x64.rpm | |
| alternatives --install /usr/bin/java java /usr/java/jdk1.8.0/jre/bin/java 20000 | |
| alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0/bin/jar 20000 | |
| alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0/bin/javac 20000 | |
| alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.8.0/jre/bin/javaws 20000 | |
| alternatives --set java /usr/java/jdk1.8.0/jre/bin/java | |
| alternatives --set javaws /usr/java/jdk1.8.0/jre/bin/javaws | |
| alternatives --set javac /usr/java/jdk1.8.0/bin/javac | |
| alternatives --set jar /usr/java/jdk1.8.0/bin/jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment