Skip to content

Instantly share code, notes, and snippets.

@JMBattista
Created October 22, 2016 20:03
Show Gist options
  • Select an option

  • Save JMBattista/e809ae4768c170ec69a6a11d99fd9c3c to your computer and use it in GitHub Desktop.

Select an option

Save JMBattista/e809ae4768c170ec69a6a11d99fd9c3c to your computer and use it in GitHub Desktop.

Revisions

  1. JMBattista created this gist Oct 22, 2016.
    13 changes: 13 additions & 0 deletions install_java_jdk
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    #!/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
    9 changes: 9 additions & 0 deletions z_environment_variables
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/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