Update-alternatives --configure Java is not working

I have installed java-20-openjdk-devel
(rpm-ostree install java-20-openjdk-devel)

But update-alternatives --configure Java gave error

I need Java and javac to be installed as a layered packages …

Any solution??

Thanks

alternatives don’t work on Silverblue right now. See: RPMs using alternatives do not install properly in rpm-ostree container · Issue #430 · fedora-silverblue/issue-tracker · GitHub

You can work around it manually by setting up the symlinks as needed. Example for the symlinks in Setting alternatives :: Fedora Docs (you don’t need Ignition, this is only an example for the paths).