Downloading Java JDK on Linux via wget is shown li

2019-01-02 21:46发布

When I try to download Java from Oracle I instead end up downloading a page telling me that I need agree to the OTN license terms.

Sorry!

In order to download products from Oracle Technology Network you must agree to the OTN license terms.

Be sure that...

  • Your browser has "cookies" and JavaScript enabled.
  • You clicked on "Accept License" for the product you wish to download.
  • You attempt the download within 30 minutes of accepting the license.

How can I download and install Java?

25条回答
到我身边
2楼-- · 2019-01-02 22:18

This works for the JDK 6, you just need to replace the download url with the latest version.

wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk6-downloads-1637591.html;" http://download.oracle.com/otn-pub/java/jdk/6u33-b03/jdk-6u33-linux-x64.bin
查看更多
登录 后发表回答