Skip to content

Instantly share code, notes, and snippets.

@muller
Last active August 29, 2015 14:21
Show Gist options
  • Save muller/3334480b1967af1e1508 to your computer and use it in GitHub Desktop.
Save muller/3334480b1967af1e1508 to your computer and use it in GitHub Desktop.
standalone jre
#!/bin/bash
B="b14"
case `uname` in
Linux) OS="linux";;
CYGWIN_NT-*)
B="b15"
OS="windows"
;;
Darwin) OS="macosx";;
esac
case `arch` in
x86_64) ARCH="x64";;
i586) ARCH="i586";;
esac
mkdir n
wget --no-check-certificate --no-clobber --no-cookies \
--directory-prefix=n \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u45-$B/jre-8u45-$OS-$ARCH.tar.gz"
cd n
tar zxf "jre-8u45-$OS-$ARCH.tar.gz"
cd ..
./n/jre1.8.0_45/bin/java -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment