Skip to content

Instantly share code, notes, and snippets.

@mlocher
Last active August 29, 2015 14:02
Show Gist options
  • Save mlocher/a50e948c67411d156b08 to your computer and use it in GitHub Desktop.
Save mlocher/a50e948c67411d156b08 to your computer and use it in GitHub Desktop.
install_java8
#!/bin/bash
# Codeship now integrates a JDK switcher, see
# https://codeship.io/documentation/languages/java-and-jvm-based-languages/#jdks
# for more information!
JAVA="jdk-8u20-linux-x64"
JAVA_URL="http://download.oracle.com/otn-pub/java/jdk/8u20-b26/$JAVA.tar.gz"
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" $JAVA_URL
mkdir -p ~/java
tar -xzf $JAVA.tar.gz -C ~/java --strip-components=1
export JAVA_HOME=/home/rof/java
export JRE_HOME=/home/rof/java/jre
export PATH=/home/rof/java/bin:/home/rof/java/jre/bin:$PATH
@mlocher
Copy link
Author

mlocher commented Nov 10, 2014

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