Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save james-s-tayler/71c8c5bcffc96bad5dfb to your computer and use it in GitHub Desktop.
Save james-s-tayler/71c8c5bcffc96bad5dfb to your computer and use it in GitHub Desktop.
Install oracle Java 8 on Ubuntu 14.04 and automatically accept the licence agreement. 100% hands-free install.
#! /bin/bash
sudo apt-get update
sudo apt-get install -y software-properties-common debconf-utils
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
sudo apt-get install -y oracle-java8-installer
@nikethg
Copy link

nikethg commented Jun 27, 2018

to install the java 8 on ubuntu the above commands(7,8) are not working

@lankro
Copy link

lankro commented Jul 26, 2018

Thank you very much, works like a charm for me on Ubuntu 16.04

@shital-gaikwad-incontact

Above commands are not working

@shital-gaikwad-incontact

2018-10-17 13:17:34 ERROR 404: Not Found.

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java8-installer

@HenningFischer
Copy link

worked for me perfectly

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