Skip to content

Instantly share code, notes, and snippets.

@zhiguangwang
Last active April 8, 2016 02:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhiguangwang/7273270d8a86d91fe9dd9e4fc5e33f77 to your computer and use it in GitHub Desktop.
Save zhiguangwang/7273270d8a86d91fe9dd9e4fc5e33f77 to your computer and use it in GitHub Desktop.
Install Oracle Java 8 on Ubuntu

Install Oracle Java 8 on Ubuntu

Install Oracle JDK 8 on Ubuntu, using the webupd8team PPA.

#!/bin/bash -ex
# Add the PPA repository
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
# The installer requires you to accept the Oracle license before the installation begins.
# This is for automated installation (auto accept license)
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | \
sudo /usr/bin/debconf-set-selections
# Install the Oracle JDK
sudo apt-get -y install oracle-java8-installer
# Set up Java environment variables
sudo apt-get -y install oracle-java8-set-default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment