I have this error:
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.
in the cloudformation template, i have:
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': []
https://github.com/widdix/aws-cf-templates/blob/master/jenkins/jenkins2-ha-agents.yaml#L1734-L1737
so, java is installed,
[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.
but how do i add jdk?
any advice is much appreciated
You need to use java-1.8.0-amazon-corretto-devel
to get the JDK, without that trailing devel
it's just a JRE
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.