Skip to content

Instantly share code, notes, and snippets.

@P7h
Created July 17, 2015 08:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save P7h/a66ce0f7e70055b3df1a to your computer and use it in GitHub Desktop.
Save P7h/a66ce0f7e70055b3df1a to your computer and use it in GitHub Desktop.
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