src/modules/java-vm.eselect.in has this code: VM_BASE="${EROOT}/usr/lib/jvm/" ... set_symlink() { ... ln -snf "${VM_BASE}/${target}" "${symlink}" ... that causes the target to be broken when installing into a root. $ emerge --root /tmp/foo dev-java/openjdk-bin then we see: $ ls -l /etc/java-config-2/current-system-vm lrwxrwxrwx 1 root root 33 Jun 2 15:36 /etc/java-config-2/current-system-vm -> /tmp/foo/usr/lib/jvm/openjdk-bin-11 the symlink target needs to use EPREFIX, not EROOT.