About this question
Hi Guys, I have configured Maven in Jenkins. But it is showing me the below error when I tried to run any job.
[maven] $ /maven/bin/mvn -f pom.xml clean package
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
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
How can I solve this error?