- Find the download page for your required version of oracle java. Example: https://www.oracle.com/java/technologies/javase-jdk11-downloads.html
- Click on the file link that you want to download
- Click I accept terms
- Right click the green download button
- Copy link address Example: https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/java/jdk/11.0.11%2B9/ab2da78f32ed489abb3ff52fd0a02b1c/jdk-11.0.11_osx-x64_bin.dmg
- Take the next url and replace
otn
withotn-pub
and you get the driect download url: Example: https://download.oracle.com/otn-pub/java/jdk/11.0.11%2B9/ab2da78f32ed489abb3ff52fd0a02b1c/jdk-11.0.11_osx-x64_bin.dmg
Note: This gist is adapted from this comment in another similar gist.
It seems that it does not work now.