This article is participating in “Java Theme Month – Java Debug Notes Event”, see < Event link > for more details.
directory
- The problem
- To solve
The problem
Q: How do I circumvent the authorization protocol when DOWNLOADING the Java JDK on Linux?
Stackoverflow address: stackoverflow.com/questions/1…
When you download Java JDK from Oracle’s official website on Linux, a message is displayed indicating that you need to agree with the OTN license. The details are as follows:
How can such authorization problems be avoided?
To solve
Specific methods are introduced according to the version:
- JDK 15
The download command is as follows:
wget –no-check-certificate -c –header “Cookie: Oraclelicense = accept – securebackup – cookies download.oracle.com/otn-pub/jav…”
- JDK 14
The download command is as follows:
wget –no-check-certificate -c –header “Cookie: Oraclelicense = accept – securebackup – cookies download.oracle.com/otn-pub/jav…” – O ~ / Downloads/JDK – 14.0.1 _linux – x64_bin. RPM
- JDK 11
The download command is as follows:
wget –no-check-certificate -c –header “Cookie: Oraclelicense = accept – securebackup – cookies download.oracle.com/otn-pub/jav…”
- The JDK 10.0.2
The download command is as follows:
wget –no-check-certificate -c –header “Cookie: Oraclelicense = accept – securebackup – cookies download.oracle.com/otn-pub/jav…”
- The JDK 10.0.1
The download command is as follows:
wget –no-check-certificate -c –header “Cookie: Oraclelicense = accept – securebackup – cookies download.oracle.com/otn-pub/jav…”
- JDK 9
The download command is as follows:
Wget download.java.net/java/GA/jdk…
- JDK 8u191
TAR GZ:
The download command is as follows:
wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3a%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk8-downloads-2133151.html; oraclelicense=accept-securebackup-cookie;” “Download.oracle.com/otn-pub/jav…”
RPM: Download the following command:
wget –no-cookies –no-check-certificate –header “Cookie: gpw_e24=http%3a%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk8-downloads-2133151.html; oraclelicense=accept-securebackup-cookie;” “Download.oracle.com/otn-pub/jav…”
- JDK 8u131
RPM:
The download command is as follows:
Wget -c –header “Cookie: Oraclelicense =accept-securebackup-cookie” download.oracle.com/otn-pub/jav…
TAR GZ:
The download command is as follows:
Wget -c –header “Cookie: Oraclelicense =accept-securebackup-cookie” download.oracle.com/otn-pub/jav…
- JDK 7u79
TAR GZ: Download the file using the following command:
wget –no-check-certificate –no-cookies –header “Cookie: Oraclelicense = accept – securebackup – cookies download.oracle.com/otn-pub/jav…”
Run the following command to download the curl file:
Curl -v – J-K-L-h “Cookie: Oraclelicense =accept-securebackup-cookie” download.oracle.com/otn-pub/jav… > jdk-7u79-linux-x64.rpm