Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

264
Vistas
Using OpenJDK 14 in Jenkins

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)
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Generally, you can install the "Jenkins AdoptOpenJDK installer Plugin"

Then in your Global Tool Configuration | Add JDK (${JENKINSURL}/configureTools/), you will

  • Add JDK
  • tick install automatically
  • Delete Installer (thereby removing the default Oracle installer)
  • Add Installer
  • Install from adoptOpenJDK.net
  • Save

If you have more than one JDK installed, in your jobs, you should now have an option to choose JDK or specify in the pipeline tools section.

Alternatively, you can just specify the path to where JDK14 is installed beforehand instead of dynamically installing.

It would seem you have the "installed beforehand" part done, but are missing the Global tool configuration, setting the path for jdk-14, so it's not overriding the SYSTEM default.

JDK Global tool config

(obviously, pick from drop down or set path).

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda