StackOverflow和其他社区(AskUbuntu,Unix和
Linux等)上有很多帖子,提供有关如何使用wget或cUrl自动从Oracle网站下载Java发行版的建议.它们都涉及发送一个cookie,假设在真正的下载链接出现之前,人们通常必须手动接受许可协议.
原文链接:https://www.f2er.com/oracle/205245.html但是,在尝试下载最近已移至Oracle Archive page的Java 7 SDK时,这些都不适用于我.
如果我转到此页面,请手动接受许可协议,然后复制下载链接,如下所示:
http://download.oracle.com/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
请注意,它中间有otn,而所有其他帖子都是关于存储在underotn-pub中的URL.
wget –no-cookies –no-check-certificate –header“Cookie:oraclelicense = a”http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux -x64.tar.gz
但是,这不适用于otn类型的URL.相反,wget返回:
--2017-05-23 12:11:12-- http://download.oracle.com/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 92.122.214.233,92.122.214.217 Connecting to download.oracle.com (download.oracle.com)|92.122.214.233|:80... connected. HTTP request sent,awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/akam/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following] --2017-05-23 12:11:12-- https://edelivery.oracle.com/akam/otn/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.0.39.115,2a02:26f0:8f:29a::2d3e Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.0.39.115|:443... connected. HTTP request sent,awaiting response... 302 Moved Temporarily Location: https://login.oracle.com/pls/orasso/orasso.wwsso_app_admin.ls_login?Site2pstoreToken=v1.2~CA55CD32~5B4FBD9FD4FC906722CB92CC3F7FA417B904138FD53F875C3FEFDF932EC5928D866C8B39EACAA55F28099E034BAC612F869C90A39B20E322E380F4A006B9668EAD35323A1C548EAD5D03EE8D6C772A88C049F024986DC6CCF546B00D347731F76BE786B96F0041610DEE7B6B4EAC27DCBE558B151B032973F065FC0367918B72DBCAB4B7FC920BAC4C13E820DFFE1761C5C473B6E0A4F0E94FABACDB40F02AD6B2BAB1D3F57371B14048557A0291AC3F12C73A30CAF4AAEB8A545475300A1ABBD60E2BF27FB1B11BC47DE91D0E918E04E4C4663632E98752BBC07671BBD21E7C6F73D78A8A66254579EC63B99716D999 [following] --2017-05-23 12:11:12-- https://login.oracle.com/pls/orasso/orasso.wwsso_app_admin.ls_login?Site2pstoreToken=v1.2~CA55CD32~5B4FBD9FD4FC906722CB92CC3F7FA417B904138FD53F875C3FEFDF932EC5928D866C8B39EACAA55F28099E034BAC612F869C90A39B20E322E380F4A006B9668EAD35323A1C548EAD5D03EE8D6C772A88C049F024986DC6CCF546B00D347731F76BE786B96F0041610DEE7B6B4EAC27DCBE558B151B032973F065FC0367918B72DBCAB4B7FC920BAC4C13E820DFFE1761C5C473B6E0A4F0E94FABACDB40F02AD6B2BAB1D3F57371B14048557A0291AC3F12C73A30CAF4AAEB8A545475300A1ABBD60E2BF27FB1B11BC47DE91D0E918E04E4C4663632E98752BBC07671BBD21E7C6F73D78A8A66254579EC63B99716D999 Resolving login.oracle.com (login.oracle.com)... 209.17.4.8 Connecting to login.oracle.com (login.oracle.com)|209.17.4.8|:443... connected. HTTP request sent,awaiting response... 401 Authorization required Username/Password Authentication Failed.
看起来他们要么改变了有关身份验证的内容,要么之前从未使用过Oracle Archive页面中的链接(之前从未尝试过).
知道如何使用wget或cUrl或类似方法下载最新的Oracle Java 7 SDK .tar.gz存档吗?