I tried to install OpenJDK 12 in jenkins, with *.tar.gz installer but i get the error Cannot run program "/bin/java"
JAVA_HOME=/var/jenkins_home/tools/hudson.model.JDK/java12
Note I created the directory "hudson.model.JDK" myself.
here is the tool configuration

full error log

JDK Tool Plugin in Jenkins only support the automatic download of version up to Java SDK 1.9 so I will write the process made by me in order to config OpenJDK-11(I'm using this specific version but another version can be used) in a Jenkins running in a Docker container:
docker psdocker exec -it containerName /bin/bashcd /usr/local && wget https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gztar -zxvf openjdk-11+28_linux-x64_bin.tar.gz/usr/local.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With