Is it possible to use OpenJDK-14 in Jenkins (Docker version)? I set the version in the Configurations by unpacking the JDK from this link: https://download.java.net/openjdk/jdk14/ri/openjdk-14+36_linux-x64_bin.tar.gz
This is my Jenkinsfile:
pipeline {
agent any
tools {
jdk 'jdk-14'
maven 'Maven-3-6-3'
}
stages {
stage("build project") {
steps {
sh 'java -version'
echo 'building project...'
sh 'mvn clean install'
}
}
}
}
This is the error i get:
mvn clean install
The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE
Also the sh 'java -version' command, still gives me this:
java -version
openjdk version "1.8.0_242" OpenJDK Runtime Environment (build 1.8.0_242-b08) OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)