From xorg This can be caused by a headless jre/jdk. You need a normal one.
For example, here's how I found my headless JDK package and replaced it:
dpkg --list | grep -i jdk
sudo apt remove openjdk-21-jdk-headless
sudo apt install openjdk-21-jdk
./jmetter
=> OK