HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

JAVA home give me wrong value on Jenkins node

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
jenkinsnodegivevaluejavahomewrong

Problem

I have Jenkins node with below configuration for JavaPath:

/usr/java/jdk1.8.0_131/bin/java


I wrote a simple Jenkins job which does the following:

#!/bin/ksh
echo "JAVA_HOME=${JAVA_HOME}"
echo $PATH


for some reason, the output I'm getting is:

JAVA_HOME=/usr/java/jdk1.8.0_31


why it doesn't use the value which used to load node?

Solution

Got response from SO forum: Is there a JAVA_HOME configured under Mange Jenkins -> Global Tool Configuration -> JDK? You may have to click on JDK installations to be able to see what's configured there.

Context

StackExchange DevOps Q#11210, answer score: 1

Revisions (0)

No revisions yet.