Centos 8 -> Rocky Linux -> Java alternatives missing

Hi all,
I hope I’m in the right place.

I migrated some machines from Centos 8.x to RockyLinux 8.4 with the script migrate2rocky.sh (Migrating To Rocky Linux - Documentation), and generally, all goes well.

But in some servers, I use various versions of Java, and before to migrate I can use the command alternatives to choose the java that I need.

After to migrate this servers on RockyLinux , all java package are here, but all link in alternative /etc/alternatives and /var/lib/alternatives/ concerning java are missing (and also all java related symlink in /usr/lib/jvm/) .

Recreate all links manually is a pain.
For now, I use this workaround:
(after the migration)
1)uninstall all java (dnf remove java*)
2)reinstall java (dnf install java-1.8.0-openjdk java-11-openjdk … )
after that the alternatives for java are again present and usable

Does somebody know how to avoid losing the alternative function for java or a better way to recreate without removing all java and installing it again?

Thanks a lot
Salvo

Is that similar to: Alternatives command not working while installing Java