I set up the agent, set the JAVA environment variables necessary for it to work and build my projects. In teamcity, these variables are pulled up.
pic - https://ibb.co/Qc6Ctd7
But some build steps need to be done with a specific version of java. According to the documentation, I specify the required variable for the Java Parameters > JDK home path field in build steps of my configuration.
pic - https://ibb.co/wCqzk7z
The most interesting thing is that it highlights the possible option for specifying a variable..
But when it comes to settings that are compatible to run the build, the agent I get a notification that the agent on which the JDK_17 variable is registered, and which was highlighted to me in the JDK home path field, is incompatible due to: Implicit requirements: env.JDK_17 defined in Build step: Maven build
pic - https://ibb.co/Gsg9BFH
Perhaps there is some problem in teamcity itself in conjunction with agents on unix?
I uses TeamCity Professional 8.0.2 on 2008 windows server and Ubuntu 22.10 as agent machine
I ask for help, since I myself have already climbed all possible forums and articles, I did not find anything like this...