Closed jmnielsen7 closed 5 years ago
It looks like Oracle now has the Oracle JDK 8 downloads gated behind a login screen, so the script won't be able to get it. This is likely related to Oracle's recent license changes:
https://derflounder.wordpress.com/2018/10/19/oracle-java-jdk-openjdk-java-11-and-macos/
Well that's a mega bummer. But thanks for the response!
I can't say for sure if this is a 'just us' thing, but the IT team at my workplace has been using your awesome script for fetching the jdk (albeit a slightly older version of your script) for a while - thanks by the way! - but it stopped working a few weeks ago, I suspect because Oracle updated their pages.
I figured out that the main page it curls had changed its various jdk link URLs, compared to the older URL style parsed for in the script version we were using, to contain https instead of http, otn instead of otn-pub, and contained a new sequence of alphnumeric characters between forward slashes. I made the regex changes manually before discovering your latest script made the exact same change in the script for parsing the URLs. At least I was on the right track and got further... At that point I just downloaded and used your latest released script.
So I got past that point, but then I noticed that once it grabs the ultimate URL it wants to curl down into a DMG it's just pulling HTML and outputting it into the file whenever I try it.
I have mainly been testing that final step/curl by instantiating the values myself and typing it in as a one-liner on a bash shell, like this:
/usr/bin/curl --retry 3 -Lo "jdk.dmg" "https://download.oracle.com/otn/java/jdk/8u212-b10/59066701cf1a433da9770636fbc4c9aa/jdk-8u212-macosx-x64.dmg" -H "Cookie: oraclelicense=accept-securebackup-cookie"
I get a non-zero size file for the output of the curl which becomes the .dmg file, but what shows up as the contents of the .dmg file is the HTML for an oracle signon page which was captured in the curl:
So, am I doing something wrong or is this happening for others as well?
-Josh