Install Oracle JDK 8 on Ubuntu, using the webupd8team PPA.
Last active
April 8, 2016 02:05
-
-
Save zhiguangwang/7273270d8a86d91fe9dd9e4fc5e33f77 to your computer and use it in GitHub Desktop.
Install Oracle Java 8 on Ubuntu
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 -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