Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Last active Aug 29, 2015
Embed
What would you like to do?
install Java
MAJOR_VERSION=7
MINOR_VERSION=51
MAJOR_MINOR_VERSION="${MAJOR_VERSION}u${MINOR_VERSION}"
REVISION=13
COOKIE="gpw_e24=http%3A%2F%2Fwww.oracle.com"
#RPM="jdk-${MAJOR_VERSION}-linux-x64.rpm"
#URI="http://download.oracle.com/otn-pub/java/jdk/${MAJOR_VERSION}/${RPM}"
RPM="jdk-${MAJOR_VERSION}u${MINOR_VERSION}-linux-x64.rpm"
VERSION_DIR="${MAJOR_MINOR_VERSION}-b${REVISION}"
URI="http://download.oracle.com/otn-pub/java/jdk/${VERSION_DIR}/${RPM}"
curl -b $COOKIE -L $URI -O
rpm -ivh $RPM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment