Here's a oneliner for those who have trouble installing:
mkdir -p /tmp/btw-i-use-jdk && cd /tmp/btw-i-use-jdk && git clone 'https://aur.archlinux.org/jre.git' && git clone 'https://aur.archlinux.org/jdk.git' && cd jre && makepkg && cd ../jdk && makepkg -d && cd .. && sudo pacman -U jre/jre-*.pkg* jdk/jdk-*.pkg*
Pinned Comments
dbermond commented on 2024-03-19 19:54 (UTC)
As was made with the java packages in the official repositories, jdk now provides the jre alongside it, and both packages conflict with each other. During the package upgrade to version 22, act accordingly to your needs. For example, if you have both jdk and jre installed, only jdk will be sufficient, as it now also contains the runtime environment, and jre can be uninstalled. If you have only jre installed, no action is required.