title: Jenkins fails to download JDK from Oracle
body: <p>I've been trying to build a Maven project using Jenkins for a couple of days now.</p>
  
  <p>However it keeps failing to download the JDK from Oracle.</p>
  
  <p>It keeps giving me the following error message:</p>
  
  <blockquote>
    <p>Installing JDK jdk-8u45-oth-JPR Downloading JDK from
    <a href="http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz" rel="nofollow">http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz</a>
    Downloading 5307bytes Installing
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh [JDK] $
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh -noregister
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 1:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open html: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 2:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open head: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 3:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open title: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 3:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: Request: not found
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 4:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open META: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 5:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open link: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 6:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open link: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 7:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh:  : not found
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 8:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open body: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 9:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open div: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 10:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open table: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 11:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: cannot open tr: No
    such file /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: 12:
    /var/jenkins/tools/hudson.model.JDK/JDK/jdk.sh: Syntax error:
    redirection unexpected ERROR: Failed to install JDK. Exit code=2
    Retrying after 10 seconds</p>
  </blockquote>
  
  <p>Is there any solution to this problem?</p>