Skip to content

Instantly share code, notes, and snippets.

@P7h P7h/jdk7_download.sh
Created Jul 17, 2015

Embed
What would you like to do?
JDK 7 command line download script; For JDK8, please check: https://gist.github.com/P7h/9741922
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
#### Command line download script for JDK7 from Oracle website.
#### For JDK8, please check: https://gist.github.com/P7h/9741922
#### Oracle does not release JDK 7 public updates effective April, 2015; for more info: http://www.oracle.com/technetwork/java/javase/documentation/eol-135779.html.
## Last JDK7 version: JDK7u79
BASE_URL_7=http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79
## Previous versions
## v7u75 ==> http://download.oracle.com/otn-pub/java/jdk/7u75-b13/jdk-7u75
## v7u71 ==> http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71
JDK_VERSION=${BASE_URL_7: -8}
declare -a PLATFORMS=("-windows-x64.exe" "-linux-x64.tar.gz" "-docs-all.zip" "-windows-i586.exe" "-linux-i586.tar.gz")
for platform in "${PLATFORMS[@]}"
do
wget -c -O "$JDK_VERSION$platform" --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "${BASE_URL_7}${platform}"
### curl -L -O -H "Cookie: oraclelicense=accept-securebackup-cookie" -k "${BASE_URL_8}${platform}"
done
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.