Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Provisioning script for non-interactive Java8 installation on Linux
# From
# You need to run this script as root
# su -
echo "INSTALLING JAVA 8 AS USER `whoami` "
echo "deb trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src 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:// --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

This comment has been minimized.

Copy link
Owner Author

@aweijnitz aweijnitz commented Jan 26, 2015

Tested on Debian 7 (Wheezy)


This comment has been minimized.

Copy link

@davidfischer-ch davidfischer-ch commented Jul 5, 2017

Thanks to you I updated my Ansible Library davidfischer-ch/ansible-roles@102ace3.


This comment has been minimized.

Copy link

@vliubko vliubko commented Apr 19, 2019

The Oracle JDK License has changed for releases starting April 16, 2019.

Oracle Java (JDK) 8 Installer PPA is DISCONTINUED now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment