There's a closed pull request on the void-packages repository [RFC] Fix alternatives for openjdk{11,17} https://github.com/void-linux/void-packages/pull/47416 Description: #### Testing the changes - I tested the changes in this PR: **briefly** Make sure alternatives for openjdk match the files that are shipped, to fix an issue with disappearing `/usr/bin/java`. Steps to reproduce: - install `openjdk11-jre` so there is a symlink `/usr/bin/java -> ../lib/jvm/openjdk11/bin/java` - install `openjdk11` so the alternative switches from `java` to `jdk`, which also makes a symlink `/usr/bin/java -> ../lib/jvm/openjdk11/bin/java` - uninstall `openjdk11` so the alternative switches back from `jdk` to `java`. The symlink will be removed for `jdk` but not added back for `java`. Arguably this is a bug in `xbps-alternatives`, but it doesn't seem ok for a package to provide an alternative for a file it doesn't contain (or for two packages to provide the exact same alternative. However, I'm not sure this is ok. What happens if one tries to use `jdk` alternative from one version and `java` alternative from a different version? Maybe that's the reason why this was set up this way. Thus the [RFC]. I also didn't bump the revision, let me know if I should do that or just fix it and wait for a next update. I found this while installing and uninstalling `jmol` which depends on `java-environment`, thus `openjdk11` would be installed/uninstalled breaking `/bin/java` for me. I also think `jmol` should not depend on java-environment but that java-runtime should be good enough (it seems to run ok; I don't use it directly but only through sage which uses it sometimes to create png files). So I added a commit here to that effect, but of course I could move that to a separate PR. Ping: @mhmdanas @classabbyamp since you often update these.