0

I have a Jenkins job, that should be run by slave, that is on Windows Server 2012 (amd64).

It connects with the repository successfully, but when I want to add an Invoke top-level Maven targets step, I get this ERROR

ERROR: JAVA_HOME not found in your environment. Please set the JAVA_HOME variable in your environment to match the location of your Java installation

Okey, that looks like I need to find a jdk directory and show a pass to it. But I don't really know, how to do it. I tried different command define a correct location of JAVA_HOME

which java

/cygdrive/c/ProgramData/Oracle/Java/javapath/java

whereis java

java: /cygdrive/c/IBM/RationalSDLC/common/java /cygdrive/c/ProgramData/Oracle/Java/javapath/java.exe

So what is a path to JAVA_HOME in my case?

Thanks in advance.

dice2011
  • 937
  • 2
  • 15
  • 30

1 Answers1

2

Please look at this answer

You have to set JAVA_HOME that points to your JDK installation path.

Community
  • 1
  • 1
Stimpson Cat
  • 1,444
  • 19
  • 44