I want to use Java 8 in an application, but this version of Java is not installed on the TeamCity build agent I'm using. What is the proper procedure of upgrading Java to the latest version on the agent without breaking the builds of other projects which are still running on Java 7?
How to upgrade build agent to support Java 8
Asked Answered
teamcity agents are standalone JVM's. In the configuration of the agents , you can define which java version is used by default.
In case you do not mention any java version in your build targets(steps), the default java version of the agent will be used.
To do this, install the latest java on the host on which the agent runs. Then change the default JRE for the agent which is supposed to run java 8. After that you need to create a pool for agents that can run on java8 and make sure that your target is running on this agent. You can even map specific agents to a target through the section "Agent Requirements"
© 2022 - 2024 — McMap. All rights reserved.