I coincidently found the solution. My idea to change the java version using update-alternatives
was correct. Unluckily that one obviously doesn’t work on Arch. They use a helperscript called archlinux-java, which is quite confusing for me.
Using archlinux-java status
displays all installed java versions and shows which one is default. This can be done as user.
archlinux-java status
Available Java environments:
java-11-openjdk
java-13-openjdk (default)
java-8-openjdk
Executing archlinux-java set $javaversion
sets the desired java environment as default. $javaversion has to be replaced with the appropriate version displayed by the status command. This has to be done as root.
In this case the command is :
# archlinux-java set java-8-openjdk
Thanks to @FredBezies I knew that I had to choose version 8. That did the trick. So there are no conflicts installing different java versions.