Last active
April 19, 2019 12:42
-
-
Save aweijnitz/92bbb761c9e407809193 to your computer and use it in GitHub Desktop.
Provisioning script for non-interactive Java8 installation on Linux
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/sh | |
# From http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html | |
# | |
# You need to run this script as root | |
# | |
# su - | |
echo "INSTALLING JAVA 8 AS USER `whoami` " | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list | |
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list | |
# Accept license non-iteractive | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections | |
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 | |
apt-get update | |
apt-get install -y oracle-java8-installer | |
# Make sure Java 8 becomes default java | |
apt-get install -y oracle-java8-set-default | |
# exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Oracle JDK License has changed for releases starting April 16, 2019.
Oracle Java (JDK) 8 Installer PPA is DISCONTINUED now.
http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html