Question
The build agent machine has multiple Java versions installed. How to make the build agent use a specific version of Java as its runtime?
Answer
- Set the
TEAMCITY_JREenvironment variable on the agent machine and point it to the desired Java installation directory. - If the agent is running on Windows, edit the
<Build Agent Home>\launcher\conf\wrapper.conffile and setwrapper.java.commandto the desired Java executable. - Note that if the
<Build Agent Home>/jredirectory exists and contains a valid JRE, the build agent will always use it by default.
Additional information
This section of the documentation explains how the agent selects the Java version.
Comments
0 comments
Please sign in to leave a comment.