Some game servers require using Java Runtime Environment (JRE) such as Minecraft and Project Zomboid.
If you are unsure which version to choose simply pick the default JRE.
To install the most up to date JRE for the distro run:
apt install default-jre
openjdk, run the following changing the version number:
apt install openjdk-8-jre
apt install openjdk-11-jre
apt install openjdk-16-jre
apt install openjdk-17-jre
Run the following command, changing the version number:
yum install java-1.8.0-openjdk
yum install java-11-openjdk
JRE Availability Table Different Distros have different versions of Java. This page will outline the different versions that are available.