Created
October 1, 2016 23:52
-
-
Save 5a494d/28d2b1f4617902c1737c5b8329cafd2d to your computer and use it in GitHub Desktop.
install-java-8.sh
This file contains hidden or 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 | |
# ø | |
# Run this script as root | |
# Installs Java here: /usr/lib/jvm/java-8-oracle | |
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" > /etc/apt/sources.list.d/webupd8team-java.list | |
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" >> /etc/apt/sources.list.d/webupd8team-java.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886 | |
apt-get update | |
apt-get -y install oracle-java8-installer | |
java -version | |
type java | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment