TeamCity default jdk for buildAgent on linux

Solution 1:

You need to set JDK version of the buildAgent in the settings page of the project.

The JRE versions you specified are for Teamcity server. If you go to Edit Configuration Settings page of the project, there's Build Step link. In the Build Step page, you can specify JDK and JDK home path.