Created
January 21, 2018 16:43
-
-
Save codematix/1e22b71cb7c686da0a346d389cfe8b00 to your computer and use it in GitHub Desktop.
Java 8 Ubuntu Fix
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
#!/bin/bash | |
set -e | |
add-apt-repository -y ppa:webupd8team/java | |
apt-get update | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections | |
apt-get install -y oracle-java8-installer || true | |
#todo remove this kludge and the above || true when the ppa is fixed | |
cd /var/lib/dpkg/info | |
sed -i 's|JAVA_VERSION=8u151|JAVA_VERSION=8u162|' oracle-java8-installer.* | |
sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/|' oracle-java8-installer.* | |
sed -i 's|SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f"|SHA256SUM_TGZ="68ec82d47fd9c2b8eb84225b6db398a72008285fafc98631b1ff8d2229680257"|' oracle-java8-installer.* | |
sed -i 's|J_DIR=jdk1.8.0_151|J_DIR=jdk1.8.0_162|' oracle-java8-installer.* | |
apt-get update |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment