It looks like it's no longer possible to download java (not version 9 anyhow) publicly without accepting a EULA anymore

I tried creating a script earlier and failed with the following response

Autodownload Files

Autodownload was available only for JRE 7 and earlier. As JRE 7 updates are no longer public there are no releases available for autodownload.

Please visit our Java SE download page to get the latest version of the JRE.

You will be redirected to the Java SE Download Page in 10 seconds. Please update your bookmarks to the Java SE download page.

I've been trying the past hour to try find a way around this, the only way to do this is to host the java files elsewhere which I don't think is allowed anymore due to copyright issues

Also when I tried downloading via a direct link I get the following message also

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.