Joao  Vitorino Joao Vitorino - 11 months ago 102
Java Question

Jenkins doesn't recognize Java 1.6

I'm trying to configure Jenkins with Java 1.6, 1.7 and 1.8.

$ update-alternatives --config java
Há 3 programas que oferecem "java".
Seleção Comando
*+ 1 /usr/lib/jvm/java-1.8.0-openjdk-
2 /usr/lib/jvm/java-1.7.0-openjdk-
3 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java

As you can see the Java installation are ok. But I can configure only Java 1.8 and 1.7 on jenkins Global Tool Configuration.

jenkins can not find the installation of java 1.6

/usr/lib/jvm/jre-1.6.0-openjdk.x86_64 not look like a jdk directory


The jenkins JAVA_HOME parameter expects to a valid JDK directory.

You provided a JRE directory and therefore your mistake.

Simply replace the value to the JDK directory of your Java 1.6 installation.

More info about JDK vs. JRE click here