Skip to content

Instantly share code, notes, and snippets.

@wavezhang
Last active November 13, 2024 02:42
Show Gist options
  • Save wavezhang/ba8425f24a968ec9b2a8619d7c2d86a6 to your computer and use it in GitHub Desktop.
Save wavezhang/ba8425f24a968ec9b2a8619d7c2d86a6 to your computer and use it in GitHub Desktop.
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@xiaoyu2er
Copy link

@traycho
Copy link

traycho commented Apr 19, 2021

Use sdkman - https://sdkman.io/

  1. List all support java version sdk list java
  2. Install your preffered version sdk install java <Idetifier>

@zritelru
Copy link

zritelru commented Apr 20, 2021 via email

@jariahtiainen
Copy link

@ojaha065
Copy link

Link for JDK 8u291 (Windows x64) if someone happens to be looking for that:
https://download.oracle.com/otn-pub/java/jdk/8u291-b10/d7fc238d0cbf4b0dac67be84580cfb4b/jdk-8u291-windows-x64.exe

@zritelru
Copy link

zritelru commented Apr 27, 2021 via email

@Bind-9
Copy link

Bind-9 commented May 2, 2021

Thanks :)

@mdirienzo
Copy link

otn-pub trick still works like a charm! Thanks for finding this and saving me!

For those wondering: Click on link of file you want, accept agreement checkbox, right click on the green button and "copy address". Paste this into url and keep everything after "nextUrl=". Change "otn" to "otn-pub", and press enter.

Copy link

ghost commented May 8, 2021

Link for JDK 8u291 (Windows x64) if someone happens to be looking for that:
https://download.oracle.com/otn-pub/java/jdk/8u291-b10/d7fc238d0cbf4b0dac67be84580cfb4b/jdk-8u291-windows-x64.exe

Thanks!

@rathaROG
Copy link

(Personal note only) How to generate link for the future update:

  1. Go to https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
  2. Click on the wanted exe file and accept the license agreement
  3. Get the link from the download button

For example: https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/java/jdk/8u261-b12/a4634525489241b9a9e1aa73d9e118e6/jdk-8u261-windows-x64.exe

  1. Add necessary info into this link:

https://javadl.oracle.com/webapps/download/GetFile/1.8.0_[xxx]-b[xx]/[encrypted_path]/windows-i586/[file_name_exe]

  • [xxx] is the update number; for example 261
  • [xx] is the build number; for example 12
  • [encrypted_path] is the encrypted path; for example a4634525489241b9a9e1aa73d9e118e6
  • [file_name_exe] is the exe file name; for example jdk-8u261-windows-x64.exe
  1. Final and ready download link will be:
    https://javadl.oracle.com/webapps/download/GetFile/1.8.0_261-b12/a4634525489241b9a9e1aa73d9e118e6/windows-i586/jdk-8u261-windows-x64.exe

https://javadl.oracle.com/webapps/download/GetFile/1.8.0_291-b10/d7fc238d0cbf4b0dac67be84580cfb4b/windows-i586/jdk-8u291-windows-x64.exe

Still works ^_^

@SofiaSanabria
Copy link

Go to:
https://www.oracle.com/java/technologies/javase-jdk16-downloads.html#license-lightbox

Read under:
Important Oracle JDK License Update
The Oracle JDK License has changed for releases starting April 16, 2019.
Oracle also provides the latest OpenJDK release under the open source GPL License at jdk.java.net.
Then go to:
Java Platform, Standard Edition 16 Reference Implementations:
RI Binary (build 16+36) under the GNU General Public License version 2
Oracle Linux 7.8 x64 Java Development Kit (sha256) 176 MB
Windows 10 x64 Java Development Kit (sha256) 176 MB

https://jdk.java.net/java-se-ri/16

I hope this helps

@anjia0532
Copy link

anjia0532 commented May 14, 2021

(Personal note only) How to generate link for the future update:

  1. Go to https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
  2. Click on the wanted exe file and accept the license agreement
  3. Get the link from the download button

For example: https://www.oracle.com/webapps/redirect/signon?nexturl=https://download.oracle.com/otn/java/jdk/8u261-b12/a4634525489241b9a9e1aa73d9e118e6/jdk-8u261-windows-x64.exe

  1. Add necessary info into this link:

https://javadl.oracle.com/webapps/download/GetFile/1.8.0_[xxx]-b[xx]/[encrypted_path]/windows-i586/[file_name_exe]

  • [xxx] is the update number; for example 261
  • [xx] is the build number; for example 12
  • [encrypted_path] is the encrypted path; for example a4634525489241b9a9e1aa73d9e118e6
  • [file_name_exe] is the exe file name; for example jdk-8u261-windows-x64.exe
  1. Final and ready download link will be:
    https://javadl.oracle.com/webapps/download/GetFile/1.8.0_261-b12/a4634525489241b9a9e1aa73d9e118e6/windows-i586/jdk-8u261-windows-x64.exe

https://javadl.oracle.com/webapps/download/GetFile/1.8.0_291-b10/d7fc238d0cbf4b0dac67be84580cfb4b/windows-i586/jdk-8u291-windows-x64.exe

Still works ^_^

thanks @rathaROG

my post https://juejin.cn/post/6844903945194733575/#heading-1 ,Translation and reference your answer

@bloosd
Copy link

bloosd commented May 14, 2021

thanks all
it's working for me with just replace "otn" to "otn-pub", like this :
https://download.oracle.com/otn/java/jdk/11.0.11%2B9/ab2da78f32ed489abb3ff52fd0a02b1c/jdk-11.0.11_windows-x64_bin.exe

@anjia0532
Copy link

jdk8+ ok ,but jdk8 not

thanks all
it's working for me with just replace "otn" to "otn-pub", like this :
https://download.oracle.com/otn/java/jdk/11.0.11%2B9/ab2da78f32ed489abb3ff52fd0a02b1c/jdk-11.0.11_windows-x64_bin.exe

@aszeli
Copy link

aszeli commented May 17, 2021

Has anyone gotten it to work for jdk8u202?
When I try with "otn", it downloads a HTML header. When I try with "otn-pub", it gives a 404 error
wget -c --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/8u202-b08/1961070e4c9b4e26a04e7f5a083f551e/jdk-8u202-linux-x64.tar.gz

@aszeli
Copy link

aszeli commented May 17, 2021

@starchivore worked, thank you!

@spaksa
Copy link

spaksa commented May 19, 2021

Oracle needs to get rid of that sign in.........................

@nikpatil18
Copy link

Good one saved the day

@mgreco84
Copy link

Hi, Seems to me Oracle needs more servers to deal with overload, they need these servers on now & totally. Mirrors would be a good thing/good too, but you can not mirror through a login page. Its not a good thing when the download you are doing is not there, or not good. I hope 8u291 comes down rather fast & is good. I need it for a .APK project using 3rd party software. Thank you all for the links! Thank you! Thank you, Michael

@mgreco84
Copy link

Oracle needs to get rid of that sign in.........................

Yes, they totally do! Their/Oracle's Sign-In/Log-In is nothing more then a tool for DDOS attacks, the Profile.Oracle.com, might be under this kind of attack right now. Not good... Oracle. Oracle... Take the Sign-In/Log-In page down! It is WAY STUPID to have a sign-in/log-in/create account for FREE SOFTWARE! Thank you! Thank you, Michael

@starchivore
Copy link

Oracle needs to get rid of that sign in.........................

FYI - here's an official site and there's no need to sign in at all, actually it's been there since 2003:

https://www.java.com/en/download/manual.jsp

Since they're giving the most important numbers away, it's a piece of cake to figure everything out just like this:

@JustifydWarrior
Copy link

Link for JDK 8u291 (Windows x64) if someone happens to be looking for that:
https://download.oracle.com/otn-pub/java/jdk/8u291-b10/d7fc238d0cbf4b0dac67be84580cfb4b/jdk-8u291-windows-x64.exe

Thanks so much @ojaha065, this worked for me... the account login is a slippery slope. Oracle is the worst of all of all the companies making money from open source products. Downloading compiled open source, should not require a login (see GitHub for examples).

See this warning for what I mean by "slippery slope", they have changed their licensing terms for commercial uses: https://www.java.com/en/download/windows_manual.jsp

@sud007
Copy link

sud007 commented May 23, 2021

Damn! I was about to get started with the wget command and then decided to scroll to bottom!
Thanks @starchivore And I remember that old link very well!

@anjia0532
Copy link

anjia0532 commented Jun 2, 2021

@starchivore where are you find this token ? e.g. jdk windows 244570_d7fc238d0cbf4b0dac67be84580cfb4b .

https://www.java.com/en/download/manual.jsp only show the jre download url.

Maybe through prefixes to loop and ping it?

download jre to get _d7fc238d0cbf4b0dac67be84580cfb4b and loop 244553 ~ 244607 ?

@ojaha065
Copy link

ojaha065 commented Jun 2, 2021

Y'all really should start migrating your projects to JDK 11 and OpenJDK...

@sebaxakerhtc
Copy link

sebaxakerhtc commented Jun 2, 2021

Y'all really should start migrating your projects to JDK 11 and OpenJDK...

There are many apps which work on oracle only. And there is no option to download it without registration.
My own projects always work with openjdk and latest versions

@aauni
Copy link

aauni commented Jun 7, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment