wget http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm
1
下載下來後,文件大小是8K…8K…html
後來想到,應該是作了什麼防禦吧,監控網絡,發現有cookie防禦。java
因而把命令改爲:linux
wget -c -P /java/jdk --no-check-certificate --no-cookie --header "Cookie: s_nr=1479818001999; s_cc=true; s_sq=oracledevall%3D%2526pid%253Docom%25253Aen-us%25253A%25252Fcn%25252Fjava%25252Fjavase%25252Foverview%25252F%2526pidt%253D1%2526oid%253Dotn%25253Acn%25253Atab%25253Ajava%25253A%2525E4%2525B8%25258B%2525E8%2525BD%2525BD%2526oidt%253D1%2526ot%253DA%2526oi%253D1; ELOQUA=GUID=4b703a6e148b4855a6708de929b383a5; gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fcn%2Fjava%2Fjavase%2Fdownloads%2Fjdk7-downloads-1880260.html; oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm
1
成功下載:cookie
這個下載到的目錄是 /java/jdk 目錄網絡
還有一個短一點的代碼,也能夠:oracle
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm
1
這個下載到的目錄是當前目錄!.net
OK,但願你們解決了linux下載jdk問題。
————————————————
版權聲明:本文爲CSDN博主「諳憶」的原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處連接及本聲明。
原文連接:https://blog.csdn.net/qq_26525215/article/details/53643346htm