2

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?

1
  • Looks like JAVA_HOME is the path to the Java installation while the "JavaPath" is the path to the binary executable named java (?) ... Are you sure that the variable should be named "JavaPath" to get picked up and propagate as an environment variable? How is it a "real problem" for you, any stacktrace for some actual task or are you just needing to know? Did you read this stackoverflow.com/questions/8185593/…
    – Niklas R.
    Apr 5 '20 at 23:35
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.