Created
October 22, 2016 20:03
-
-
Save JMBattista/e809ae4768c170ec69a6a11d99fd9c3c to your computer and use it in GitHub Desktop.
Upgrade JDK Codeship
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 | |
# Allows manually configuring the java version to use with http://codeship.io | |
# | |
# This should not be necessary for most users thanks to the jdk_switcher | |
# (see: https://documentation.codeship.com/languages/java-and-jvm-based-languages/) | |
# However if you need to test against a specific version of the JDK it could still be useful. | |
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 | |
# This command is not a necessary part of the setup but is useful for verifying that configuration worked as expected | |
java -version |
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 | |
# Note: You will have to update the version number in multiple places for this to work | |
# Note: The url contains a '-b26' in this version that will likely change if you update the version, double check the URL! | |
JAVA=jdk-8u20-linux-x64 | |
JAVA_URL=http://download.oracle.com/otn-pub/java/jdk/8u20-b26/$JAVA.tar.gz | |
JAVA_HOME=/home/rof/java | |
JRE_HOME=/home/rof/java/jre | |
PATH=/home/rof/java/bin:/home/rof/java/jre/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment