Skip to content

Instantly share code, notes, and snippets.

@TamerShlash
Last active August 27, 2016 12:05
Show Gist options
  • Select an option

  • Save TamerShlash/f9519fd570a9b0d76165 to your computer and use it in GitHub Desktop.

Select an option

Save TamerShlash/f9519fd570a9b0d76165 to your computer and use it in GitHub Desktop.

Revisions

  1. TamerShlash revised this gist Nov 29, 2014. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions oracle_java8_installer.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    # 1. Use a PROXY and go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and accept the terms then download the tar.gz suitable to your system (32 or 64 bit).
    # 2. Move that tarball to the Downloads directory in your home folder.
    # 2. Move that .tar.gz tarball to the Downloads directory in your home folder.
    # 3. run this script as sudo

    if [[ $UID != 0 ]]; then
    @@ -11,11 +11,11 @@ apt-get install python-software-properties
    add-apt-repository ppa:webupd8team/java
    apt-get update
    apt-get install oracle-java8-installer
    if [ ! -f $HOME/Downloads/jdk-8u5-linux-*.tar.gz ]; then
    if [ ! -f $HOME/Downloads/jdk-8u*-linux-*.gz ]; then
    echo "The JDK tar.gz file was not found in $HOME/Downloads. please download it, put it in $HOME/Downloads and run again."
    exit 1
    fi
    cp ~/Downloads/jdk-8u5-linux-*.tar.gz /var/cache/oracle-jdk8-installer/
    cp ~/Downloads/jdk-8u*-linux-*.gz /var/cache/oracle-jdk8-installer/
    apt-get install oracle-java8-installer
    apt-get install oracle-java8-set-default
    java -version
  2. TamerShlash renamed this gist Jul 4, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. TamerShlash created this gist Jul 4, 2014.
    21 changes: 21 additions & 0 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    # 1. Use a PROXY and go to http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html and accept the terms then download the tar.gz suitable to your system (32 or 64 bit).
    # 2. Move that tarball to the Downloads directory in your home folder.
    # 3. run this script as sudo

    if [[ $UID != 0 ]]; then
    echo "This script neeeds to be run with sudo, like this:"
    echo -e "\n sudo $0 $*\n"
    exit 1
    fi
    apt-get install python-software-properties
    add-apt-repository ppa:webupd8team/java
    apt-get update
    apt-get install oracle-java8-installer
    if [ ! -f $HOME/Downloads/jdk-8u5-linux-*.tar.gz ]; then
    echo "The JDK tar.gz file was not found in $HOME/Downloads. please download it, put it in $HOME/Downloads and run again."
    exit 1
    fi
    cp ~/Downloads/jdk-8u5-linux-*.tar.gz /var/cache/oracle-jdk8-installer/
    apt-get install oracle-java8-installer
    apt-get install oracle-java8-set-default
    java -version