jenkins设置JAVA_HOME环境变量

https://stackoverflow.com/questions/16031515/java-home-is-not-defined-correctly-only-from-jenkins

 

For others, I had to add the PATH /usr/bin/ to my PATH variable within Jenkins. (Find your correct path using which java).

Jenkins > Manage Jenkins > Configure System

Add an Environment Variable >>

e.g:

Name: PATH
Value: /usr/local/bin/:/usr/bin/

Screenshot

Leave a Reply

Your email address will not be published. Required fields are marked *