If a build agent uses a Java version older than Java 8 (e.g. Java 6 or 7), you will see the corresponding warning on the agent's page and a health item in the web UI.
Support for Java prior to version 8 will be dropped in future TeamCity versions. Consider upgrading Java on the agent if you see the warning.
To update Java on agents, do one of the following:
Upgrade the Java automaticallySwitch to using newer Java: if the appropriate Java version of the same bitness as the current one is detected on the agent, the agent page provides an action to upgrade the switch to using that Java automatically. Upon the action invocation, the agent process is restarted (once the agent becomes idle, i.e. finishes the current build if there is one) using the new javaJava.
Upon the action invocation, the path to the detected Java is saved into the conf/teamcity-agent.jvm file, the agent process is restarted (once the agent becomes idle, i.e. finishes the current build if there is one) and uses the new java from the file.
- (Windows) Since the build agent
.exeinstallation comes bundled with the required Java, you can just manually reinstall the agent using the
.exeinstaller obtained from the TeamCity server | Agents page.
- Install a required Java 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 web UI (see above).
- Install a required Java on the agent and configure the agent to use it.