Support for OpenJDK 8 will end in April 2021, and after that, AdoptOpenJDK , which will last until 2026, will definitely be available on the security server  .

NB: AdoptOpenJDK has been supported since X-Road version 6.26 . Using AdoptOpenJDK on an earlier version is not supported and may cause issues.

Installing AdoptOpenJDK

1.  Add the GPG key:

wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
BASH

2.  Add the AdoptOpenJDK repository:

echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/adoptopenjdk.list
BASH


3. Update the package list and install the AdoptOpenJDK software:

sudo apt update && sudo apt install adoptopenjdk-8-hotspot-jre
BASH

4. Check the location of AdoptOpenJDK:

dpkg -L adoptopenjdk-8-hotspot-jre | grep 'java$'
BASH

Probably this is:  /usr/lib/jvm/adoptopenjdk-8-hotspot-jre-amd64

5. Change the value of the JAVA_HOME parameter in the /etc/xroad/services/local.conf file to the  new AdoptOpenJDK:

/etc/xroad/services/local.conf

JAVA_HOME=/usr/lib/jvm/adoptopenjdk-8-hotspot-jre-amd64
BASH

6. Restart X-Road services:

sudo service xroad-* restart
BASH

After installation, you can remove the old Java software, but make sure that nothing else is using the old Java on the server.