We have a ubuntu server with teamcity installed.
Teamcity is warning us that the java version that's using is old. The message is
This TeamCity server is using a deprecated version of Java (8). Please upgrade Java as future versions of TeamCity will be incompatible with Java 8.
I've downloaded the package jdk-17.0.10_linux-x64_bin.deb
from oracle web site, and I've installed it with sudo dpkg -i jdk-17.0.10_linux-x64_bin.deb
. Then, I've run the command
sudo update-java-alternatives --set jdk-17-oracle-x64
I've rebooting the server, and the command java -version
gives to me
java version "17.0.10" 2024-01-16 LTS
Java(TM) SE Runtime Environment (build 17.0.10+11-LTS-240)
Java HotSpot(TM) 64-Bit Server VM (build 17.0.10+11-LTS-240, mixed mode, sharing)
So it seems ok. But Teamcity is complaining that the version is yet the old one. And also other variables like $J2REDIR
seems to point to the old installation
$ echo $J2REDIR
/usr/lib/jvm/java-8-oracle/jre
What I'm doing wrong? How can I set correctly the java version for Teamcity?
update-alternatives
is half configured. I suggest removing this Deb and installing the package from Ubuntu repository