I suspect that something (Jenkins tool definition, local setting on the computer, etc.) is defining a JAVA_HOME environment variable as c:\Program Files\Java\jre1.8.0_201.
Add a bat step to the job prior to calling `ant` and run the command `set`. That will report the environment variable to confirm the guess that something is placing value that into the environment. On Fri, Jun 7, 2019 at 8:49 AM ABostonGal ABostonGal <[email protected]> wrote: > I have an ANT build that has been working just fine for quite a while and > suddenly it has stopped working and I am trying to figure out why. Here is > what the Jenkins console displays and my notes about it. I've obscure the > actual site name, directory values, and Jenkins job name, etc. "uvwx" is > the Jenkins job that is failing to build > > In Jenkins console: > > No changes for svn://ab/cd/ef/gh/ijk since the previous build > > Copied 3 artifacts from "lmnop" build number 137 > > Copied 2 artifacts from "qrst" build number 2700 > > [uvwx] $ cmd.exe /C > "C:\Users\jenkins\jenkins_home\tools\hudson.tasks.Ant_AntInstallation\Ant_1.9.6\bin\ant.bat > get-revision compile-tests compile-javadoc package-jar package-javadoc && > exit %%ERRORLEVEL%%" > Unable to locate tools.jar. Expected to find it in C:\Program > Files\Java\jre1.8.0_201\lib\tools.jar > > > My notes about this: > > What I want to know is: WHY does the build "expect" to find it in > "c:\Program Files\Java\jre1.8.0_201"? There IS no such path on the machine > on which the job is building... > > How can I find out WHERE that value is coming from? I've been looking at > the ant, build files and source code and don't see where that value would > be set. > > Thank you. > > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/794e1399-0d52-42d9-b805-0e197667d3c6%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/794e1399-0d52-42d9-b805-0e197667d3c6%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Thanks! Mark Waite -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEjQTsh2fgCNtBP5PNcM_%3DbCBBpq0XGWExob6%3D7sv9yBg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
