I spent about 45 minutes debugging this in a script I wrote that works fine on Mojave and determined that there must be a difference in the behavior of curl, corresponding to the difference in version of curl rolled out with each OS, since I literally copy and pasted the same command and ran it on both OSes with different results. The curl on Catalina (with the same flags, header, and URL to fetch with otn-pub), with the verbose flag set, shows that it will not even get as far as the redirect (why -L is present) before it errors, and what output it does fetch shows the 'unauthorized' message from Oracle you typically see when the header is not passed. With reference to the curl command I left above, I discovered something a little surprising: It works like a charm on Mojave but not on Catalina.
Wget -c -no-cookies -no-check-certificate -header "Cookie: oraclelicense=accept-securebackup-cookie" Ĭurl -O -k -L -H "Cookie: oraclelicense=accept-securebackup-cookie" Īdd -C - if you want the resume function like shown in the wget example.Īlso interesting is that -L (for redirect) was essential, and I ended up finding a second URL to fetch when I ran the above command with the -verbose flag:
Sorry, something went anyone know how to run this command using curl instead of wget? ~$ wget -c -no-cookies -no-check-certificate -header "Cookie: oraclelicense=accept-securebackup-cookie"
Then right-click on the green download link and follow the same procedure described above, retrieving the right link from the nexturl= parameter query. Check the box that says you agree (if you agree). A box will pop up saying you need to accept the license agreement. Instead of right-clicking on the download link, just click on it first.
The URL that follows nexturl= is the actual link that will download the file to your computer.ĮDIT 11/6/19: The page has updated their link flow slightly, but this method still works. You'll see the link points to something like /webapps/redirect/signon, but it has a query attached that starts with " nexturl=". Select "Copy Link Location" and then paste it into a text editor like Notepad. If you want to download any JRE or JDK without signing into Oracle, go to the downloads page for the version you want (such as ) and right-click on the Download link of your choice. NOTE: you may need to change the otn in the path to otn-pub as described below.
The URL that follows nexturl= is the actual link that will download the file to your computer. Paste the copied link into a text editor like Notepad. NOTE: If clicking Download doesn't show a box and takes you straight to the login page instead, you will need to clear your cookies on the Java website (or open in incognito mode).But instead of clicking on the green Download link (which will send you to the login page), right-click the download link and select Copy Link Location.
When a window pops up saying you need to accept the license agreement, check the box that says you agree. To download any JRE or JDK from the Oracle download page without signing in, go to the downloads page for the version you want (such as ) and click on the Download link of your choice.