Question
The documentation on Java update mentions:
To update Java on agents, do one of the following:
- Since the build agent Windows installer comes bundled with the required Java, you can just manually reinstall the agent using the Windows installer (
.exe) obtained from the TeamCity server Agents page.
Is it possible to update Java used by the Windows Build Agent without manually reinstalling the agent itself?
Answer
Reinstalling the agent is one of the methods to update Java used by the Windows Build Agent.
It is possible to install a required Java version on the agent into one of the standard locations, and restart the agent — the agent should then detect it and provide an action to use a newer Java in the UI.
If the <Agent home>/jre directory exists and has JRE executable files in it, it will be used to run the build agent, as it takes priority over other standard locations. As such, Java may be upgraded with the following method:
- Install the required Java version anywhere on the machine.
- Stop the build agent.
- Copy the Java installation directory contents to
<Agent home>/jredirectory. - Start the build agent.
Alternatively, if you use the Administration > Agent JDKs page to manage available JDKs/JREs for your build agents, you may:
- Download the full agent distribution in .zip.
- Stop the build agent.
- Replace the
<Agent home>/jredirectory with thejredirectory from the downloaded .zip agent distribution file. - Start the build agent.
Comments
0 comments
Please sign in to leave a comment.