5.0.0~M1-1 openhab.service not picking up java 21 installed using sdkman, but 17 instead

For completeness using sdkman.
Installing a new openHAB version will overwrite the service file.
Create a sticky Drop-In like this:

sudo mkdir /etc/systemd/system/openhab.service.d
sudo nano /etc/systemd/system/openhab.service.d/custom.conf
[Service]
Environment="JAVA_HOME=/home/omr/.sdkman/candidates/java/21.0.6.crac-zulu"
sudo systemctl daemon-reload
sudo systemctl restart openhab

omr@shs3:~$ sudo systemctl status openhab
● openhab.service - openHAB - empowering the smart home
     Loaded: loaded (/usr/lib/systemd/system/openhab.service; enabled; preset: enabled)
    Drop-In: /etc/systemd/system/openhab.service.d
             └─custom.conf
     Active: active (running) since Mon 2025-04-14 19:05:23 CEST; 1min 13s ago
       Docs: https://www.openhab.org/docs/
             https://community.openhab.org
   Main PID: 147819 (java)
      Tasks: 226 (limit: 38106)
     Memory: 1.0G (peak: 1.0G)
        CPU: 4min 42ms
     CGroup: /system.slice/openhab.service
             └─147819 /home/omr/.sdkman/candidates/java/21.0.6.crac-zulu/bin/java -XX:-UsePerfData -Dopenhab.home=/usr/share/openhab -Dopenhab.conf=/etc/openhab -Dopenhab.runtime=/usr/share/openhab/ru>

Apr 14 19:05:23 shs3 systemd[1]: Started openhab.service - openHAB - empowering the smart home.