Reputation: 1513
I've just started setting up a build server, using Jenkins.
Right now i have an extremely vanilla setup. Just trying to get it to run the default target of a specific build file. However whenever i run it jenkins reports this:
[build] $ cmd.exe /C '"ant.bat -file build.xml compileReleaseBuild && exit %%ERRORLEVEL%%"'
'"java.exe"' is not recognized as an internal or external command, operable program or batch file.
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
The odd thing is, i have my PATH and JAVA_HOME enviroment variables set up correctly, and i can run this command from the command line correctly. What is it that jenkins does that is different from running the commands by hand?
Upvotes: 2
Views: 4588
Reputation: 1513
As stated by gareth_bowles, Jenkins runs as the system account on your machine. This means that any permissions or configuration (like your enviroment variables) have to be set in the system context as well. (more info here on setting env as the system account)
Upvotes: 1