It’s been quite some time since I’ve written java code, but that back trace looks to me like the program is not handling an error condition or missing resource gracefully.
I checked what yay -S java-runtime does and it installs jre11-openjdk-11.0.8.u10-1 which is what I use for intellij-idea-community-edition so I’m pretty sure this isn’t an issue with the JRE install.