...
java -Dawt.toolkit.name=WLToolkit -Dsun.java2d.vulkan=True J2Ddemo.jar
Here is an updated build instruction for building jdk21.0.1-wayland branch (on ubunu 24.04):
$ sudo wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | tee /etc/apt/trusted.gpg.d/lunarg.asc
$ sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-noble.list https://packages.lunarg.com/vulkan/lunarg-vulkan-noble.list
$ sudo apt update
$ sudo apt-get -y install openjdk-21-jdk file zip unzip autoconf make build-essential libx11-dev libxext-dev libxrender-dev \
libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev libwayland-dev \
libxtst-dev libxt-dev libxrandr-dev libcups2-dev libfontconfig1-dev libasound2-dev libwayland-dev \
libxkbcommon-x11-0 vulkan-sdk vulkan-utility-libraries-dev
$ sh configure --with-vulkan
$ make images