Updating Java Version for TeamCity on Ubuntu Server
If you have installed TeamCity on an Ubuntu server and received a warning message about the Java version that it is using, it is likely that the version is outdated and no longer supported. This article will guide you through the process of updating the Java version for TeamCity on an Ubuntu server.
Checking the Current Java Version
Before updating the Java version, it is important to check the current version that is installed on your Ubuntu server. To do this, open a terminal and enter the following command:
java -version
This will display the current Java version installed on your system. If the version is 8 or lower, then it is recommended to update to a newer version.
Installing a New Java Version
To install a newer Java version, you can use the following command:
sudo apt-add-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-javaversion-installer
Replace version with the desired Java version number. For example, to install Java 11, use the following command:
sudo apt-get install oracle-java11-installer
During the installation process, you will be prompted to accept the Oracle license agreement. Once the installation is complete, you can verify the new Java version by running the following command:
java -version
Updating TeamCity to Use the New Java Version
After installing the new Java version, you need to update TeamCity to use it. To do this, open the TeamCity web interface and navigate to the Administration section. Then, click on the Global Settings link and scroll down to the Java section. Change the Java Home path to the new Java version installation directory, as shown in the following screenshot:

Once you have updated the Java Home path, click the Save button to apply the changes. TeamCity will now use the new Java version.
In this article, we have covered the process of updating the Java version for TeamCity on an Ubuntu server. This involves checking the current Java version, installing a new Java version, and updating TeamCity to use the new Java version. By following these steps, you can ensure that your TeamCity installation is using a supported and up-to-date Java version.