Skip to content

Instantly share code, notes, and snippets.

@instaBOT
Last active October 13, 2016 15:31
Show Gist options
  • Save instaBOT/940a8d06843d0a52aa3fec56524102fe to your computer and use it in GitHub Desktop.
Save instaBOT/940a8d06843d0a52aa3fec56524102fe to your computer and use it in GitHub Desktop.
Install Oracle Java 8 (JRE and JDK) in Ubuntu 14.04
#!/usr/bin/env bash
set -eu
sudo add-apt-repository --yes ppa:webupd8team/java
sudo apt-get update
sudo apt-get install --yes oracle-java8-installer
# test Java
java -version
# java version "1.8.0_101"
# Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
# Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
printf '\n\tSet env var "JAVA_HOME" to "/usr/lib/jvm/java-8-oracle/"\n\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment