How do I install multiple version of java in a containerized Teamcity deployment
I am upgrading my Teamcity instance. I need Java 1.8, 11 and 17 installed so I can chose which one to compile with. I can't just compile a 1.8 project with 17 as some of the runtime servers still only have 1.8 installed and a project compiled with a higher java version wont run.
I'm trying to do this on TeamCity 2023.5 but can't find any documentation on running multiple java versions. 2023.5 only comes with Java 17.
Thanks,
Paul
Please sign in to leave a comment.
1. Use a custom image based on the official agent image. Cons: custom image is a maintenance overhead.
2. Install the required JDK as the first build step. Cons: additional build step is a build time overhead.