
Download Oracle Java JRE & JDK using a script
Oracle has recently disallowed direct downloads of java from their servers (without going through the browser and agreeing to their terms, which you can look at here: Oracle terms). So, if you try:
wget "http://download.oracle.com/otn-pub/java/jdk/7u4-b20/jdk-7u4-linux-x64.tar.gz"
you will receive a page with "In order to download products from Oracle Technology Network you must agree to the OTN license terms" error message.
This can be rather troublesome for setting up servers with automated scripts.
Luckily, it seems that a single cookie is all that is needed to bypass this (you still have to agree to the terms to install):
Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie
So, if you want to download jdk7u4 for 64-bit Linux (e.g., Ubuntu) using wget, you can use:
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u4-b20/jdk-7u4-linux-x64.tar.gz"
Just for reference, here are the links to the current (at the time of posting) downloads of JDK and JRE
UPDATE: Seems that you now need the --no-check-certificate flag for wget or you'll get a "cannot verify edelivery.oracle.com's certificate" error.
UPDATE 2: Starting with 7u51 they changed the cookie name, it's now "oraclelicense", thank you Yngve for posting in the comments - I updated the commands to include both cookies.
UPDATE 3: I'm switching to OpenJDK due to new licensing of Oracle JDK, there's no need to maintain this for OpenJDK. 8u202 will be the last version.
JDK 8u202
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-arm32-vfp-hflt.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-arm64-vfp-hflt.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-i586.rpm
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-i586.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-x64.rpm
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-x64.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-macosx-x64.dmg
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-solaris-sparcv9.tar.Z
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-solaris-sparcv9.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-solaris-x64.tar.Z
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-solaris-x64.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-windows-i586.exe
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-windows-x64.exe
JRE 8u202
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-i586.rpm
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-i586.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-x64.rpm
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-linux-x64.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-macosx-x64.dmg
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-macosx-x64.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-solaris-sparcv9.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-solaris-x64.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-windows-i586-iftw.exe
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-windows-i586.exe
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-windows-i586.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-windows-x64.exe
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jre-8u202-windows-x64.tar.gz
Server JRE 8u202
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/server-jre-8u202-linux-x64.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/server-jre-8u202-solaris-sparcv9.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/server-jre-8u202-solaris-x64.tar.gz
- https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/server-jre-8u202-windows-x64.tar.gz
Posted Sat 05 May 2012 by Ivan Dyedov in Java (Java, Ubuntu, Linux)
66 comments
-
zatanas 2018-08-10T15:39:30 -
utybo 2018-03-18T19:09:01 -
Ivan Dyedov 2018-03-18T22:55:09
-
-
arielnmz 2015-06-17T02:53:55 -
Reiner030 2014-07-30T20:06:08 -
Ivan Dyedov 2014-07-30T20:18:37 -
Reiner030 2014-07-30T20:57:37
-
-
-
Reiner030 2014-07-16T18:52:27 -
Chris 2014-06-07T09:53:21 -
Chris 2014-04-21T08:31:45 -
Yngve 2014-03-15T13:35:49 -
Ivan Dyedov 2014-03-15T15:23:58
-
-
O'Shaughnessy 2014-03-12T18:33:30 -
webofmars 2014-03-12T10:13:15 -
Ivan Dyedov 2014-03-12T18:29:24
-
-
Tom 2014-02-26T00:45:59 -
Azathoth 2014-02-21T09:10:51 -
Pazzo 2014-01-07T22:24:42 -
Biju 2014-01-01T10:18:32 -
Khalil 2013-11-02T14:11:33 -
Ivan Dyedov 2015-09-05T00:21:40
-
-
Srihari 2013-10-30T08:52:46 -
pritesh 2013-10-18T11:01:23 -
Richard Murray 2013-10-17T11:32:32 -
Richard Murray 2013-10-25T13:32:00
-
-
linda 2013-10-15T13:34:28 -
Lxur 2013-10-03T18:19:56 -
pessimism 2013-08-22T13:20:27 -
kumaran 2013-08-14T08:48:09 -
Ivan Dyedov 2013-08-14T14:20:08
-
-
Birju 2013-07-02T21:04:13 -
Jamalulkhair Khairedin 2013-06-29T09:50:51 -
Bill 2013-06-23T01:22:44 -
xxor 2013-05-21T12:45:18 -
Gabriela 2013-03-25T13:01:50 -
Ivan Dyedov 2013-03-27T03:16:45
-
-
Jamie 2013-03-09T00:41:19 -
ronanm 2013-02-04T02:56:16 -
KDinesh 2013-02-02T12:56:44 -
Ben 2013-02-01T14:43:12 -
Steve Shockley 2013-01-30T19:35:19 -
Janaka 2013-01-22T12:53:19 -
Riaan 2013-01-16T18:48:15 -
Ivan Dyedov 2013-01-16T20:46:44
-
-
sarvaan 2013-01-05T18:01:38 -
Clement 2012-11-29T20:21:41 -
Wolfgang 2012-11-21T06:18:26 -
pessimism 2013-08-22T13:19:55
-
-
David 2012-11-15T17:59:14 -
Cameron 2012-11-15T04:26:32 -
Evans Yeh 2012-10-25T10:43:24 -
Taylor 2012-10-18T00:56:13 -
Ivan Dyedov 2013-03-16T22:45:42
-
-
Arven "Muckwaddle" Draconis 2012-10-15T07:39:02 -
Chen Fliesher 2012-10-07T13:59:30 -
Julian Melendez 2012-09-30T00:04:13 -
Giles Westwood 2012-09-25T18:29:21 -
Darío 2012-09-25T06:19:53 -
iantruslove 2012-09-21T20:45:10 -
hendra 2012-09-20T10:02:02 -
xkorey 2012-09-17T12:59:59 -
calc 2012-08-23T18:45:20 -
kirit 2012-08-06T11:57:16 -
Hiren Patel 2012-08-05T14:07:46 -
Shmuel Krakower 2012-07-11T09:41:56 -
Cristi 2012-05-18T18:12:24