When I am Running My Vagrantfile with its shell, I'm struggle with Java 8 install with this exact same error :
StackOverflow - jdk-8-is-not-installed-error-404-not-found
In order to fix that error, I added those lines :
sudo sed -i 's|JAVA_VERSION=8u151|JAVA_VERSION=8u162|' /var/lib/dpkg/info/oracle-java8-installer.*
sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/|' /var/lib/dpkg/info/oracle-java8-installer.*
sudo sed -i 's|SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f"|SHA256SUM_TGZ="68ec82d47fd9c2b8eb84225b6db398a72008285fafc98631b1ff8d2229680257"|' /var/lib/dpkg/info/oracle-java8-installer.*
sudo sed -i 's|J_DIR=jdk1.8.0_151|J_DIR=jdk1.8.0_162|' /var/lib/dpkg/info/oracle-java8-installer.*
I have in my Shell this block for java section:
# /*======================
# = JAVA =
# ======================*/
# https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-debian-8
sudo apt-get install -y software-properties-common
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | sudo tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list.d/webupd8team-java.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
sudo apt-get update
# Silent !! Sshh !
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
# see https://stackoverflow.com/questions/46815897/jdk-8-is-not-installed-error-404-not-found
# Still not work
sudo sed -i 's|JAVA_VERSION=8u151|JAVA_VERSION=8u162|' /var/lib/dpkg/info/oracle-java8-installer.*
sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/|' /var/lib/dpkg/info/oracle-java8-installer.*
sudo sed -i 's|SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f"|SHA256SUM_TGZ="68ec82d47fd9c2b8eb84225b6db398a72008285fafc98631b1ff8d2229680257"|' /var/lib/dpkg/info/oracle-java8-installer.*
sudo sed -i 's|J_DIR=jdk1.8.0_151|J_DIR=jdk1.8.0_162|' /var/lib/dpkg/info/oracle-java8-installer.*
sudo apt-get install -y oracle-java8-installer
sudo apt-get install -y oracle-java8-set-default
The weird thing is : Those lines taken one by one via SSH when the box is started and you can install Java, it Works. But it's not working when I provision for the first time my vagrant box.
Is the problem comes from sed or another command ? I suppose it's the sed's command but don't know how to fix it, because it's working if I paste them via SSH.
I want to make this work without any manual interventions.
You can test my VM using this github repo (V2) :
VagrantFile + shells
How can I make this work using vagrant up ?
EDIT :
I've tested it on Vagrant 2.0 and virtualBox 5.6
Also tested with vagrant 1.7 and virtualBox 5.1
I'm putting this in just in case anyone is fine with Debians basic version, but has missed it. I think it should already be installed on anything but the most bare-bones systems.
To get openJDK working, which is the version offered in Debians standard repos, you would just need to use
apt-get install -y openjdk-8-jdk
There are other debug and docs packages as well.
Debian also provide a package in the contrib repos called java-package which converts the source tarball from the Oracle site (you have to get it yourself to OK the terms and conditions), and creates a deb from it. Unfortunately there doesn't seem to be a way to directly presume yes to the questions asked, so it would need an expect script or something.
config.vm.provision "shell", inline: <<-SHELL
# add contrib repos into source files.
mv /etc/apt/sources.list /etc/apt/sources.bk
sed -r ‘s/stretch([^ ]*) main$/& contrib/‘ /etc/apt/sources.bk | sudo tee /etc/apt/sources.list
# vi -c ':%s/stretch\([^ ]*\) main$/& contrib/g' /etc/apt/sources.list -c 'wq'
apt-get update
apt-get install -y java-package java-common expect
# some `expect` needed magic here
sudo -u vagrant fakeroot make-jpkg /vagrant/jdk-8*
dpkg -i oracle-java8*
SHELL
In terms of the interactions I get using make-jpkg, this script works (from the command line)
expect -c '
set timeout -1
spawn fakeroot make-jpkg /vagrant/jdk-8u162-linux-x64.tar.gz
expect "Is this correct \\\[Y/n\\\]: $" { send "Y\r" }
expect "Press \\\[Return\\\] to continue: " { send "\r" }
expect "*Press \\\[Return\\\] to continue or Ctrl-C to abort." { send "\r" }
expect eof { exit 0 }
'
but could probably be done other ways.
So almost an answer, but may get you a bit closer.
Sorry for my late answer. Another option is to mount a drive and install the oracle rpm package silently.
Create directory and put there your Vagrantfile. This the root of your project. (./)
Vagrantfile
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "bento/centos-7.4"
config.vm.boot_timeout = 240
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# View the documentation for the provider you are using for more
# information on available options.
config.vm.provider "virtualbox" do |vb|
# Enable the Host I/O cache for more performance
vb.customize [
"storagectl", :id,
"--name", "SATA Controller",
"--hostiocache", "on"
]
vb.auto_nat_dns_proxy = false
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "off"]
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
vb.customize ["modifyvm", :id, "--nictype2", "virtio"
vb.customize ["modifyvm", :id, "--memory", 4096]
vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
vb.cpus = 4
end
# Synced folders are configured within your Vagrantfile using the config.vm.synced_folder method.
# Vagrant shares by default the root directory of (./) with guest on /vagrant
config.vm.synced_folder ".", "/vagrant", disabled: true
# Synced folder is set as read-only for guest machine. You can configure the files on the host machine.
# For more mount options check: http://manpages.ubuntu.com/manpages/precise/man8/mount.vboxsf.8.html
config.vm.synced_folder "./installfiles", "/installfiles",
owner: "vagrant", group: "vagrant", mount_options: ["ro"]
# Bootstrap shell scripts.
config.vm.provision "shell", path: "./bootstrap/setup.sh"
config.vm.post_up_message = "Finsihed provisioning!\n" \
"Type \"vagrant ssh\" to get started"
end
Create another directory named bootstrap from the root of your project. Create an empty file called setup.sh, put the content below in the setup.sh file. The file path will be ./bootstrap/setup.sh
setup.sh
#!/usr/bin/env bash
echo "installing Java 8 64 bit"
sudo rpm -i /installfiles/java8/jdk-8u144-linux-x64.rpm
unzip /installfiles/java8/jce_policy-8.zip -d /tmp
sudo cp -f /tmp/UnlimitedJCEPolicyJDK8/* $JAVA_HOME/lib/security/
Go to the oracle website download the correct 32 or 64 bit rpm linux package. Versions available on the oracle website might change. For this example i downloaded the jdk-8u144-linux-x64.rpm package. I also downloaded the unlimited encryption strength policy from the oracle website, name of the file is: jce_policy-8.zip.
Create two directories from the root of your project named installfiles/java8. Place the downloaded files in there. The files path will be: ./installfiles/java8/jdk-8u144-linux-x64.rpm and ./installfiles/java8/jce_policy-8.zip
Run the command vagrant up. On your host machine the directory ./installfiles will be synchronised with your virtualbox guest machine on the path /installfiles. During the provisioning state of vagrant java-8 will be installed automatically. Keep in mind that the rpm package manager comes out of the box with Red Hat distros. But it is also possible to install rpm packages on debian distros.
The following snippet fixes the silent install of java from webupd8team repo for Debian distribution
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:webupd8team/java
sudo bash -c "echo deb http://http.debian.net/debian jessie-backports main >> /etc/apt/sources.list"
sudo bash -c "echo deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main >> /etc/apt/sources.list.d/webupd8team-java.list"
sudo bash -c "echo deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main >> /etc/apt/sources.list.d/webupd8team-java.list"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
sudo apt-get update
sudo apt-get -y upgrade
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selectionssudo
sudo apt-get -y install oracle-java8-installer oracle-java8-set-default
As of today, it installs the following
vagrant#debian-8:~$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
I am trying installl jave 8 (jre/jdk) in my ubuntu 14.0.4
sudo apt-get update
sudo apt-get install oracle-java8-installer
I get below error
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2017-10-17 16:42:09-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 64.78.224.186, 64.78.224.185
Connecting to download.oracle.com (download.oracle.com)|64.78.224.186|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz [following]
--2017-10-17 16:42:10-- https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.217.152.181, 2600:141b:13:28c::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.217.152.181|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508276650_49e5615c0aa8584dd72b809fbec787eb [following]
--2017-10-17 16:42:10-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508276650_49e5615c0aa8584dd72b809fbec787eb
Connecting to download.oracle.com (download.oracle.com)|64.78.224.186|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-17 16:42:11 ERROR 404: Not Found.
download failed
Oracle JDK 8 is NOT installed.
looks like it is looking for 8u144 which is not available.
How can i make it look for 8u151?
I did this
sudo add-apt-repository ppa:webupd8team/java -> no luck
This has been an issue as of today (we hit the webupd8team ppa once a day for oracle-8-installer). From past experience it's probably due to the fact that Oracle released their quarterly Java updates overnight (8u151 and 8u152), and moved or deleted 8u144. If you dig into the ppa you'll see it only references 8u144.
I'm not that knowledgable on how the webupd8team ppa is managed, but presumably it requires some manual intervention on the maintainer's part to fix the issue.
I am trying out this solution:
https://ubuntuforums.org/showthread.php?t=2374686 -> No luck at the moment
What works for me, I tried manually with this:
Create a folder to put JDK
mkdir /opt/jdk
cd /opt
Download the latest JDK:
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.tar.gz
Extract it
tar -zxf jdk-8u152-linux-x64.tar.gz -C /opt/jdk
Set it as default
update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_152/bin/java 100
update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_152/bin/javac 100
"As a temporary work around":
cd /var/lib/dpkg/info
sudo sed -i 's|JAVA_VERSION=8u144|JAVA_VERSION=8u152|' oracle-java8-installer.*
sudo sed -i 's|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/|PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/|' oracle-java8-installer.*
sudo sed -i 's|SHA256SUM_TGZ="e8a341ce566f32c3d06f6d0f0eeea9a0f434f538d22af949ae58bc86f2eeaae4"|SHA256SUM_TGZ="218b3b340c3f6d05d940b817d0270dfe0cfd657a636bad074dcabe0c111961bf"|' oracle-java8-installer.*
sudo sed -i 's|J_DIR=jdk1.8.0_144|J_DIR=jdk1.8.0_152|' oracle-java8-installer.*
And then try installing JAVA again. From this ubuntuforums thread.
After downloading the Java Oracle tar ball to your home directory, you will need to run the following script to automatically install Java 8.
#!/bin/bash -e
JAVA_VER=$(javadd -version 2>&1 | sed -n ';s/.* version "\(.*\)\.\(.*\)\..*"/\1\2/p;')
if [ "${JAVA_VER}" != "18" ]; then
file_name="jdk-8u172-linux-x64.tar.gz"
cd ~
sudo mkdir -p /opt/jdk
sudo tar -zxf ~/${file_name} -C /opt/jdk
sudo apt-get remove -y --purge openjdk-\* || true
cd /opt/jdk/jdk1.8.0_172/bin
for j in `ls j*`; do
sudo update-alternatives --force --install /usr/bin/${j} ${j} /opt/jdk/jdk1.8.0_172/bin/${j} 100
done
sudo update-alternatives --display java
fi
I've been trying to create an alpine-based docker image with Oracle Java (rather than openjdk). I have been specifically asked to create our own image here.
This is the Dockerfile I've come up with:
FROM alpine:3.6
RUN apk add --no-cache curl wget
RUN mkdir /opt/ && \
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie"\
http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz && \
tar xvf jdk-8u131-linux-x64.tar.gz -C /opt/ && \
rm jdk-8u131-linux-x64.tar.gz && \
ln -s /opt/jdk1.8.0_131 /opt/jdk
ENV JAVA_HOME /opt/jdk
ENV PATH $PATH:/opt/jdk/bin
RUN echo $JAVA_HOME && \
echo $PATH
RUN which java
RUN java -version
There are some unnecessary commands (like echoing the JAVA_HOME dir) which were added to help with debugging, but now I'm stuck: RUN which java returns /opt/jdk/bin/java as expected, but RUN java -version returns /bin/sh: java: not found.
I've tried a few things, including symlinking the executable(s) into /usr/bin, to no avail.
What am I missing?
EDIT:
Final output from docker is:
The command '/bin/sh -c java -version' returned a non-zero code: 127
Final edit:
Thanks to diginoise for putting me on to MUSL vs libc. I found adding the following to my Dockerfile allowed me to build a working image:
RUN apk --no-cache add ca-certificates && \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk && \
apk add glibc-2.25-r0.apk
Found at: https://github.com/sgerrand/alpine-pkg-glibc
You cannot achieve what you want
Alpine Linux uses MUSL as a Standard C library.
Oracle's Java for linux depends on GNU Standard C library (gclib).
Here is a bit more detailed info and official stance from Oracle on the topic
the JDK source code has not yet been ported to Alpine Linux, or more specifically, the musl C library. That is, it turns out that the thing about Alpine Linux that sticks out/is different from a JDK source code perspective is the C library.
The solution
If you looking for small Java Docker images, use OpenJDK ones.
openjdk:11-jre-slim image is only 77MB.
If you insist, on your head be it...
There is theoretical way, but it is not as trivial as you think.
You can find many examples of Alpine images running with OracleJDK like here or see expert's answer to this question as well.
They add the missing Standard GNU C library.
Be warned however...
All of these solutions could be in breach of Oracle's license agreement stating that the license is non-transferable, and the distributable is non-modifiable.
In the Dockerfiles you will find however:
Cookie: oraclelicense=accept-securebackup-cookie"
and many entries similar to
rm -rf ${JAVA_HOME}/*src.zip
For further details about legality of prepackaged Oracle's JRE or JDK Docker images see this article.
In case anyone needs fresh version of JDK I maintain Alpine Oracle JDK images https://hub.docker.com/r/expert/docker-java-minimal
Sources
https://github.com/unoexperto/docker-java-minimal/
I found an answer that works finally. All is needed is just the GlibC; huge thanks to S. Gerrand, this is such a big help.
Here's how to get the old JDK 8 running in Alpine 1.13:
FROM alpine:3.13
RUN apk --no-progress --purge --no-cache upgrade \
&& apk --no-progress --purge --no-cache add --upgrade \
curl \
wget \
openssh \
&& apk --no-progress --purge --no-cache upgrade \
&& rm -vrf /var/cache/apk/* \
&& curl --version
# Install vanilla GLibC: https://github.com/sgerrand/alpine-pkg-glibc
RUN curl -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& curl -LO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \
&& apk add glibc-2.32-r0.apk
RUN wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz \
&& tar xvf jdk-8u131-linux-x64.tar.gz -C /opt \
&& rm jdk-8u131-linux-x64.tar.gz \
&& ln -s /opt/jdk1.8.0_131 /opt/jdk
ENV JAVA_HOME /opt/jdk
ENV PATH $PATH:/opt/jdk/bin
RUN echo $JAVA_HOME && \
echo $PATH
RUN which java
RUN java -version
ENTRYPOINT [ "java" ]
# To test run: docker run -t khalifahks/alpine-java -version
# docker export <container-id> | docker import - khalifahks/alpine-java:exported
# quick interative termnal: docker run -it --entrypoint=sh khalifahks/alpine-java sh
When I try to download Java from Oracle I instead end up downloading a page telling me that I need agree to the OTN license terms.
Sorry!
In order to download products from Oracle Technology Network you must agree to the OTN license terms.
Be sure that...
Your browser has "cookies" and JavaScript enabled.
You clicked on "Accept License" for the product you wish to download.
You attempt the download within 30 minutes of accepting the license.
How can I download and install Java?
Works as of December 23rd, 2021 for JDK 17
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/java/17/archive/jdk-17.0.1_linux-x64_bin.rpm
Works as of July 27th, 2021 for JDK 16
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/16.0.2%2B7/d4a915d82b4c4fbb9bde534da945d746/jdk-16.0.2_linux-x64_bin.rpm
Works as of November 5th, 2020 for JDK 15
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/15.0.1+9/51f4f36ad4ef43e39d0dfdbaf6549e32/jdk-15.0.1_linux-x64_bin.rpm
Works as of 07-11-2020 for JDK 14
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/14.0.1+7/664493ef4a6946b186ff29eb326336a2/jdk-14.0.1_linux-x64_bin.rpm -O ~/Downloads/jdk-14.0.1_linux-x64_bin.rpm
PS: Alf added this ( me ) :-) this, I couldn't figured out how to just commented at the end... Enjoy it.
UPDATED FOR Oracle JDK 11
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/11+28/55eed80b163941c8885ad9298e6d786a/jdk-11_linux-x64_bin.tar.gz
UPDATED FOR JDK 10.0.2
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz
UPDATED FOR JDK 10.0.1
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/10.0.1+10/fb4372174a714e6b8c52526dc134031e/jdk-10.0.1_linux-x64_bin.tar.gz
UPDATED FOR JDK 9
it looks like you can download it now directly from java.net without sending a header
wget http://download.java.net/java/GA/jdk9/9/binaries/jdk-9+181_linux-x64_bin.tar.gz
UPDATED FOR JDK 8u191
TAR GZ:
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3a%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk8-downloads-2133151.html; oraclelicense=accept-securebackup-cookie;" "https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.tar.gz"
RPM:
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3a%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk8-downloads-2133151.html; oraclelicense=accept-securebackup-cookie;" "https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.rpm"
UPDATED FOR JDK 8u131
RPM:
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
TAR GZ:
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
RPM using curl:
curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm > jdk-8u112-linux-x64.rpm
In all cases above, subst 'i586' for 'x64' to download the 32-bit build.
-j -> junk cookies
-k -> ignore certificates
-L -> follow redirects
-H [arg] -> headers
curl can be used in place of wget.
UPDATE FOR JDK 7u79
TAR GZ:
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
RPM using curl:
curl -v -j -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm > jdk-7u79-linux-x64.rpm
Once again, make sure you specify the correct URL for the version you are downloading. You can find the URL here: Oracle JDK download site
ORIGINAL ANSWER FROM 9th June 2012
If you are looking to download the Oracle JDK from the command line using wget, there is a workaround. Run the wget command as follows:
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz"
Be sure to replace the download link with the correct one for the version you are downloading.
(Irani updated to my answer, but here's to clarify it all.)
Edit: Updated for Java 17.0.1, released in 19th October, 2021
Wget
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz
See the downloads in oracle.com for more.
-c / --continue
Allows continuing an unfinished download.
--header "Cookie: oraclelicense=accept-securebackup-cookie"
Since 15th March 2014 this cookie is provided to the user after accepting the License Agreement and is necessary for accessing the Java packages in download.oracle.com. The previous (and first) implementation in 27th March 2012 made use of the cookie gpw_e24=http%3A%2F%2Fwww.oracle.com[...]. Both cases remain unannounced to the public.
The value doesn't have to be "accept-securebackup-cookie".
Not required
--no-cookies
The combination --no-cookies --header "Cookie: name=value" is mentioned as the "official" cookie support, but not strictly required here.
cURL
curl -L -C - -b "oraclelicense=accept-securebackup-cookie" -O https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz
-L / --location
Required for cURL to redirect through all the mirrors.
-C / --continue-at -
See above. cURL requires the dash (-) in the end.
-b / --cookie "oraclelicense=accept-securebackup-cookie"
Same as -H / --header "Cookie: ...", but accepts files too.
-O
Required for cURL to save files (see [author's comparison][8] for more differences).
Downloading Java from the command line has always been troublesome. What I have been doing reciently is to use FireFox (other browsers might work) to get a download started on my laptop, pause it (within the Downloads windows), use the "Copy Download Link" menu item of the context menu displayed for the downloading file. This URL can then be used on the Linux box to download the same file. I expect the URL has a short time to live. Ugly, but generally successful.
Updated for JDK 8u171 RPM
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.rpm
Outdated links below
Updated for JDK 8u161 RPM
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.rpm
Updated for JDK 8u152 RPM
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm
Updated for JDK 8u144 RPM
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.rpm
Updated for JDK 8u131 RPM
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
Updated for JDK 8u121 RPM
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u121-b13/e9e7ea248e2c4826b92b3f075a80e441/jdk-8u121-linux-x64.rpm
I know that Oracle made everything possible to make their Java Runtime and Java SDK as hard as possible.
Here are some guides for command line lovers.
For Debian like systems (tested on Debian squeeze and Ubuntu 12.x+)
su -
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
apt-get update
apt-get install --yes oracle-java7-installer
exit
Note: if you know a better or easier way add a comment, I will update the guide.
There is a good alternative for installing different JDK from the command line ... using https://sdkman.io/ there are plenty of vendedors
sdk install java 19.0.1-oracle
latest tested,
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "https://edelivery.oracle.com/otn-pub/java/jdk/7u25-b15/jdk-7u25-linux-x64.tar.gz"
Be aware that certificate check is disabled if you care about absolute security. : )
Oracle has put a prevention cookie on the download link to force you to agree to the terms even though the license agreement to use Java clearly states that merely by using Java you 'agree' to the license..
The method that Oracle wants is you to download it with an agreement. After that, this script cn be modified for your specific Linux
#!/bin/bash
#Author: Yucca Nel http://thejarbar.org
#Will restart system
#Modify these variables as needed...
tempWork=/tmp/work
locBin=/usr/local/bin
javaUsrLib=/usr/lib/jvm
sudo mkdir -p $javaUsrLib
mkdir -p $tempWork
cd $tempWork
#Extract the download
tar -zxvf $downloadDir/jdk*tar.gz
#Move it to where it can be found...
sudo mv -f $tempWork/jdk* $javaUsrLib/
sudo ln -f -s $javaUsrLib/jdk1/bin/* /usr/bin/
#Update this line to reflect versions of JDK...
export JAVA_HOME="$javaUsrLib/jdk1.7.0_03"
#Extract the download
tar -zxvf $tempWork/*
#Move it to where it can be found...
sudo mv -f $tempWork/jdk1* $javaUsrLib/
sudo ln -f -s $javaUsrLib/jdk1*/bin/* /usr/bin/
sudo rm -rf $tempWork
#Update this line to reflect newer versions of JDK...
export JAVA_HOME="$javaUsrLib/jdk1.7.0_03"
if ! grep "JAVA_HOME=$javaUsrLib/jdk1.7.0_03" /etc/environment
then
echo "JAVA_HOME=$javaUsrLib/jdk1.7.0_03"| sudo tee -a /etc/environment
fi
exit 0
For those needing JCE8 as well, you can download that also.
curl -L -C - -b "oraclelicense=accept-securebackup-cookie" -O http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip
Or
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip
This works for the JDK 6, you just need to replace the download url with the latest version.
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk6-downloads-1637591.html;" http://download.oracle.com/otn-pub/java/jdk/6u33-b03/jdk-6u33-linux-x64.bin
this command can download jdk8 tgz package at now (2018-09-06), good luck !
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/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz"
Instead of using for every new Java version a new link or changing existing scripts, I was looking for a more generic way to automate the download of the required Java packages and later installation via yum localinstall ${JAVA_ENVIRONMENT}-${JAVA_VERSION}-linux-x64.rpm.
I've used a somehow trivial approach similar to manual/user action to find the package and to download it. I am also pretty sure that one will find a more elegant way to do it by using other tools like egrep, awk, etc.., so leave it as an example here:
#!/bin/bash
### Proxy settings
# If there is a company proxy
PROXY="my.proxy.local:8080"
PROXY_TYPE="--proxy-ntlm" # or leave empty with ""
USER="user"
PASS='pass'
### Find out the links to JRE and JDK
# To do so, got to the page http://www.oracle.com/technetwork/java/javase/downloads/
BASE_URL="technetwork/java/javase/downloads"
# Put the whole page into a single string/line
BASE_URL_OUTPUT="$(curl -s -k ${PROXY_TYPE} -x "http://${USER}:${PASS}#${PROXY}" -L0 http://www.oracle.com/${BASE_URL}/)"
# Define the environments to download
JAVA_ENVIRONMENTS=("JRE" "JDK") # ! yet "SERVER-JRE"
for JAVA_ENVIRONMENT in "${JAVA_ENVIRONMENTS[#]}"
do
echo
echo "JAVA_ENVIRONMENT="$JAVA_ENVIRONMENT
echo
for (( JAVA_BASE_VERSION = 8; JAVA_BASE_VERSION <= 10; JAVA_BASE_VERSION += 2 ))
do
echo "JAVA_BASE_VERSION="$JAVA_BASE_VERSION
### "Read the page"
# and follow the links for the package interested in
DOWNLOAD_SITE="$(echo $BASE_URL_OUTPUT | grep -m 1 -io "${JAVA_ENVIRONMENT}${JAVA_BASE_VERSION}-downloads-[0-9]*.html" -- | tail -1)"
echo "DOWNLOAD_SITE="$DOWNLOAD_SITE
### Gather the necessary download links
# To do so, following the link to the download site
# reading and accept the license
#
# ... the greedy regular expression is to address the different syntax of the links
# and already prepared for OR .gz files
DOWNLOAD_LINK_OUTPUT="$(curl -s -k ${PROXY_TYPE} -x "http://${USER}:${PASS}#${PROXY}" -L -j -H "Cookie: oraclelicense=accept-securebackup-cookie" http://www.oracle.com/${BASE_URL}/${DOWNLOAD_SITE} | grep -io "filepath.*${JAVA_ENVIRONMENT}-[${JAVA_BASE_VERSION}].*linux[-_]x64[._].*\(rpm\)" -- | cut -d '"' -f 3 | tail -1)"
# and echo out the link
echo "DOWNLOAD_LINK_OUTPUT="$DOWNLOAD_LINK_OUTPUT
done
done
Since the download links are available now, one may proceed further with wget or curl.
All of the above seem to assume you know the URL for the latest Java RPM...
Oracle provide persistent links to the latest updates of each Java version as documented at
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=397248601136938&id=1414485.1 - though you need to create/log in to an Oracle Support account. *Otherwise you can only access the last "public" update of each Java version, e.g. 1.6_u45 (Mar 2013; Latest update is u65, Oct 2013)*
Once you know the persistent link, you should be able to resolve it to the real download;
The following works for me, though I don't yet know if the "aru" reference changes.
ME=<myOracleID>
PW=<myOraclePW>
PATCH_FILE=p13079846_17000_Linux-x86-64.zip
echo "Get real URL from the persistent link"
wget -o getrealurl.out --no-cookies --no-check-certificate --user=$ME \
--password=$PW --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" \
https://updates.oracle.com/Orion/Services/download/$PATCH_FILE?aru=16884382&\
patch_file=$PATCH_FILE
wait # wget appears to go into background, so "wait" waits
# until all background processes complete
REALURL=`grep "^--" getrealurl.out |tail -1 |sed -e 's/.*http/http/'`
wget -O $PATCH_FILE $REALURL
#These last steps must be done quickly, as the REALURL seems to have a short-lived
#cookie on it and I've had no success with --keep-session-cookies etc.
As already posted here:
https://stackoverflow.com/a/41718895/4370196
Update for JDK 8 Update 121
Since Oracle inserted some md5hash in their download links, one cannot automatically assemble a download link for command line.
So I tinkered some nasty bash command line to get the latest jdk download link, download it and directly install via rpm.
For all who are interested:
wget -q http://www.oracle.com/technetwork/java/javase/downloads/index.html -O ./index.html && grep -Eoi ']+>' index.html | grep -Eoi '/technetwork/java/javase/downloads/jdk8-downloads-[0-9]+.html' | (head -n 1) | awk '{print "http://www.oracle.com"$1}' | xargs wget --no-cookies --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;" -O index.html -q && grep -Eoi '"filepath":"[^"]+jdk-8u[0-9]+-linux-x64.rpm"' index.html | grep -Eoi 'http:[^"]+' | xargs wget --no-cookies --header "Cookie: gpw_e24=xxx; oraclelicense=accept-securebackup-cookie;" -q -O ./jdk8.rpm && sudo rpm -i ./jdk8.rpm
The bold part should be replaced by the package of your liking.
I solve this (for Debian based Linux distros) by making packages using java-package a few times (for various architectures), then distributing them internally.
The big plus side is that this method always works; no matter how crazy Oracle's web pages become. Oracle can no longer break my build!
The downside is that it's a bit more work to set up initially.
Download the tar.gz files manually in a browser (thus "accepting" their terms)
Run make-jpkg jdk-7u51-linux-x64.tar.gz. This creates oracle-java8-jdk_8_amd64.deb
Distribute it within your organization
For distribution over the Internet, I suggest using a password protected apt repository or provide raw packages using symmetric encryption:
passphrase="Hard to crack string. Use /dev/urandom for inspiration."
gpg --batch --symmetric --force-mdc --passphrase-fd 0 \
oracle-java8-jdk_8_amd64.deb <<< "$passphrase"
Of course providing (unencrypted) .deb packages on the internet is probably a violation of your license agreement with Oracle, which states:
... Oracle grants you a ... license ... to reproduce and use internally the Software complete and unmodified for the sole purpose of running Programs"
On the receiving end, if you have a password protected apt repo, all you need to do is apt-get install it. If you have raw packages, download, decrypt and dpkg -i them. Works like a charm!
wget This Worked for me JDK8
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2F%www.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm"
The accepted answer was not working for me, as of 2017-04-25. However, the simple solution was using the -b flag instead of the --header option.
For example, to get jdk-1.8_131:
version='8u131'; wget -H -O jdk-$version-linux-x64.tar.gz --no-check-certificate --no-cookies -b "oraclelicense=a" http://download.oracle.com/otn-pub/java/jdk/$version-b11/jdk-$version-linux-x64.tar.gz
That will execute in the background, writing output to wget-log.
Try
wget --no-cookies --header "Cookie: s_nr=1359635827494; s_cc=true; gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk6downloads-1902814.html; s_sq=%5B%5BB%5D%5D; gpv_p24=no%20value" http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64-rpm.bin --no-check-certificate -O ./jdk-6u45-linux-x64-rpm.bin
if you are like me trying to get Oracle JDK 6.
source: Oracle JVM download using curl/wget
I've made a jdk-download script (specific for the tar.gz) for my gentoo boxes. Doesn't need to be updated like other similar scripts, trying to "brute-force" download the latest build for whatever version you want.
USAGE
jdk-download< <version> <platform> [<build>]
* <version> - Something like "8u40"
* <platform> - Usually i586 or x64
* <build> - The internal build number used by oracle, to avoid guessing and trying to download starting from 99 to 1 (build 0, really?!!)
Blog post
Source on bitbucket
oracle-java-download is a project on GitHub that allows you to create download links for JDK 8 and JDK 9 which you can use for further processing e.g in automated build or deployment processes.
It requires Linux, Docker and a JDK >= 8 to run.
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/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.rpm?AuthParam=1516282527_40effcfefd78d78bce12c0a4030a1b05"
Context
I recently faced the same problem and although the comments on this page and some
others provided helpful hints - I thought it would be good to document the steps I took to fix the problem for folks who may be in need of further help.
System Details
I am following the PNDA set up on AWS by following the step by step pnda installation guide at:
https://github.com/pndaproject/pnda-guide/blob/develop/provisioning/aws/PREPARE.md
I am using ubuntu 14.04 [free tier eligible] on AWS cloud, and am running the code from 64 bit windows8.1 laptop. I am using PUTTY to connect to the server instance. I git cloned the pnda code from https://github.com/pndaproject/pnda to the ubuntu instance.
Important Note
Please note that if you plan to use Ubuntu instance on AWS make sure it's 14.04 only. If you use version 16, it does not work. I learnt it the hard way!
Resolution Steps
As those who have gone as far as to have encountered the error being discussed here would know - the mirror creation file involves the following steps -
1) Run the script create_mirror.sh [ sudo su -s ./create_mirror.sh ] to run the full mirror creation process
2) This script in turn calls various other scripts - one of them being create_mirror_misc.sh; this script refers to pnda-static-file-dependencies.txt which has a list of files to be downloaded.
3) On the very first line of the pnda-static-file-dependencies.txt is a reference to download the jdk-8u131-linux-x64.tar.gz file from http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz oraclelicense=accept-securebackup-cookie; It is at this point that my script was failing with the message Failed to download http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz after 3 retries
4) I browsed to the page http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz and found the following error message displayed **In order to download products from Oracle Technology Network you must agree to the OTN license terms**
5) To resolve this problem I made the following change to the pnda-static-file-dependencies.txt; I added --no-check-certificate --no-cookies to bypass the license term agreement condition
6) So the revised code looks like - http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz --no-check-certificate --no-cookies oraclelicense=accept-securebackup-cookie
I hope this is helpful.
you should try:
wget \
--no-cookies \
--header "Cookie: oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/8u172-b11/a58eab1ec242421181065cdc37240b08/jdk-8u172-linux-x64.tar.gz \
-O java.tar.gz
download jdk 8u221
$ wget -c --content-disposition "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=239835_230deb18db3e4014bb8e3e8324f81b43"
$ old=$(ls -hat | grep jre | head -n1)
$ mv $old $(echo $old | awk -F"?" '{print $1}')
my blog 044-wget下载jdk8u221
Here's how to get the command yourself.
This works for any version:
Access packages page here: https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
Click the download link for your desired package
Check the box indicating that you have "reviewed and accept..."
Right-click & Copy the link address from the button
Paste into a text editor and then copy everything AFTER 'nexturl=', beginning with 'https://'
Update the download URL in this command and you should be good to go:
wget --no-check-certificate -c --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn/java/jdk/11.0.6+8/90eb79fb590d45c8971362673c5ab495/jdk-11.0.6_linux-x64_bin.tar.gz
To further explain the wget, the --no-check-certificate should be clear enough, but the header content (for any call) is discoverable by using the Developer Tools Network Tab in your browser. The developer tools are powerful and are well worth the time to learn.
Enjoy.
This problem will be solved from Oracle JDK 17 onwards -
https://www.oracle.com/java/technologies/jdk-script-friendly-urls/
The latest version of Oracle JDK 17 can be downloaded from a command line, or automatically in scripts and dockerfiles by using download URLs which will deliver the then current update release.
One can use -
wget https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz
format to get the latest 17 release
This happens because when you click the "Accept" button on the download page in your browser, the webpage saves a cookie that it uses to check your agreement before letting you download the file. The problem occurs when trying to download from the command line using wget and it's because there's no cookie information sent with the wget request for downloading the file so from the file server's perspective, you're a completely new user who hasn't accepted the license agreement.
One solution is to send cookie information using the --header option of the wget utility (as shown above in other answers). Ideally if some content is protected, you'd use the various session management options available with wget. For this particular problem however, it's solved (currently) by sending the Cookie header with the download request.
#eric answer did the trick for me, you need to accept terms in the command you are setting
i.e
"Cookie: oraclelicense=accept-securebackup-cookie"
so your final command looks thus
wget -c --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz
You can decide to update the version by changing 8u131 to 8uXXX. so long it is available in the repo.
sudo wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.rpm"
Why not click to download from your browser then copy & paste the exact link where it was downloaded, for example:
wget http://download.oracle.com/otn-pub/java/jdk/7u40-b43/jdk-7u40-linux-x64.tar.gz?AuthParam=1380225131_dd70d2038c57a4729d8c0226684xxxx
You can find out the link by looking at the network tab of your browser after accepting terms in oracle and clicking to download. F12 in Chrome. Firebug in Firefox.