For those who, like me, try to run microemulator on Linux and get an error like in the main question. Run the following commands:
sudo apt remove openjdk-*-headless sudo apt install openjdk-11-jdk export DISPLAY=:0 java -jar microemulator.jar