title: Downloading Java JDK through Script
body: <p>I have been using the following to download JDK 8u112 via a script.</p>
  
  <pre><code>wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz
  </code></pre>
  
  <p>Recently, it throws ERROR 404: Not found and when you go to the link, it shows the same text in <a href="https://stackoverflow.com/questions/10268583/downloading-java-jdk-on-linux-via-wget-is-shown-license-page-instead">Downloading Java JDK on Linux via wget is shown license page instead</a></p>
  
  <p>I've also tried <a href="http://download.oracle.com/otn/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz" rel="noreferrer">http://download.oracle.com/otn/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz</a> but it throws 401 Authorization Error.</p>
  
  <p>Is there a new work around on this?</p>