I can't access Oracle servers for some reason. Is there any way to install Java from a mirror? I'm using Fedora 24 and I need to install Oracle Java on it.


1 Answer 1


When you hit the Oracle JDK Download URL directly, you may see the html output contains <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> and see In order to download products from Oracle Technology Network you must agree to the OTN license terms. and also see You attempt the download within 30 minutes of accepting the license.

So, if you look into what JDK download page little more, there are "aggree" button in the page, and follow that link, a small javascript anchored, acceptAggreement and the code is as following:

function acceptAgreement(windowRef, part){
    var doc = windowRef.document;
    disableDownloadAnchors(doc, false, part);
    hideAgreementDiv(doc, part);
    writeSessionCookie( 'oraclelicense', 'accept-securebackup-cookie' );

See that? It's just a small cookie checking but the client should able to execute javascript to run that code. BTW, they don't really checking if the client really clicked that link or not to the server side. The meaning that 30 minutes of accepting was the session cookie length.

So, try this

First pick a distribution:

wget -O- "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" | grep "linux"

And put a cookie header like this:

wget --header="Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u101-b13/jdk-8u101-linux-x64.rpm

That's it.

Thanks to Oracle they didn't put too much complex on that page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .