Skip to content

Instantly share code, notes, and snippets.

@fdimuccio
Created September 23, 2014 13:33
Show Gist options
  • Select an option

  • Save fdimuccio/5f163b25d2ac6832e68d to your computer and use it in GitHub Desktop.

Select an option

Save fdimuccio/5f163b25d2ac6832e68d to your computer and use it in GitHub Desktop.

Revisions

  1. fdimuccio created this gist Sep 23, 2014.
    10 changes: 10 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/usr/bin/env bash
    ORACLE_JDK='http://download.oracle.com/otn-pub/java/jdk/8u20-b26/jdk-8u20-linux-x64.rpm'
    JDK_FILENAME=/home/ec2-user/jdk-linux-x64.rpm
    #if [ ! -f $JDK_FILENAME ]
    #then
    wget -O $JDK_FILENAME --no-check-certificate --no-cookies - --header "Cookie: oraclelicense=accept-securebackup-cookie" $ORACLE_JDK
    rpm -Uvh $JDK_FILENAME
    alternatives --install /usr/bin/java java /usr/java/default/bin/java 3
    alternatives --set java /usr/java/default/bin/java
    #fi