title: missing jdk when using java-1.8.0-amazon-corretto
body: <p>I have this error:</p>
  
  <pre><code>Could not find tools.jar. Please check that /usr/lib/jvm/java-1.8.0-amazon-corretto.x86_64/jre contains a valid JDK installation.
  </code></pre>
  
  <p>in the cloudformation template, i have:</p>
  
  <pre><code>        extras:
            commands:
              'a_enable_docker':
                command: 'amazon-linux-extras enable docker=18.06.1'
                test: "! grep -Fxq '[amzn2extra-docker]' /etc/yum.repos.d/amzn2-extras.repo"
              'b_enable_corretto8':
                command: 'amazon-linux-extras enable corretto8'
                test: "! grep -Fxq '[amzn2extra-corretto8]' /etc/yum.repos.d/amzn2-extras.repo"
          install:
            packages:
              rpm:
                jenkins: 'https://pkg.jenkins.io/redhat-stable/jenkins-2.176.3-1.1.noarch.rpm'
              yum:
                'java-1.8.0-amazon-corretto': []
                'ruby': []
  </code></pre>
  
  <p><a href="https://github.com/widdix/aws-cf-templates/blob/master/jenkins/jenkins2-ha-agents.yaml#L1734-L1737" rel="nofollow noreferrer">https://github.com/widdix/aws-cf-templates/blob/master/jenkins/jenkins2-ha-agents.yaml#L1734-L1737</a></p>
  
  <p>so, java is installed,</p>
  
  <pre><code>[root@ip-10-1-15-79 ~]# java -version
  openjdk version "1.8.0_222"
  OpenJDK Runtime Environment Corretto-8.222.10.2 (build 1.8.0_222-b10)
  OpenJDK 64-Bit Server VM Corretto-8.222.10.2 (build 25.222-b10, mixed mode)
  [root@ip-10-1-15-79 ~]# yum info java-1.8.0-amazon-corretto-devel
  Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
  Available Packages
  Name        : java-1.8.0-amazon-corretto-devel
  Arch        : x86_64
  Epoch       : 1
  Version     : 1.8.0_222.b10
  Release     : 2.amzn2
  Size        : 64 M
  Repo        : amzn2extra-corretto8/2/x86_64
  Summary     : Amazon Corretto development environment
  URL         : https://github.com/corretto/corretto-8
  Licence     : ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib.
  Description : Amazon Corretto's packaging of the OpenJDK 8 code.
  </code></pre>
  
  <p>but how do i add jdk?</p>
  
  <p>any advice is much appreciated</p>