# NOTE: All of these commands rely on a same-version sdk not previously being installed sudo rsync -rvP build/install-icedtea8/ /opt/icedtea8 sudo mkdir -p /var/db/pkg/dev-java/openjdk-bin-8 echo 8 | sudo tee /var/db/pkg/dev-java/openjdk-bin-8/SLOT > /dev/null sudo JDK_HOME=/opt/icedtea8 emerge dev-java/openjdk:8 sudo rm -rf /opt/icedtea8 /var/db/pkg/dev-java/openjdk-bin-8 sudo rsync -rvP build/install-jdk11/ /opt/jdk11 sudo mkdir -p /var/db/pkg/dev-java/openjdk-bin-11 echo 11 | sudo tee /var/db/pkg/dev-java/openjdk-bin-11/SLOT > /dev/null sudo JDK_HOME="$(echo /opt/jdk11/jvm/*/)" emerge dev-java/openjdk:11 sudo rm -rf /opt/jdk11 /var/db/pkg/dev-java/openjdk-bin-11 sudo rsync -rvP build/install-jdk17/ /opt/jdk17 sudo mkdir -p /var/db/pkg/dev-java/openjdk-bin-17 echo 17 | sudo tee /var/db/pkg/dev-java/openjdk-bin-17/SLOT > /dev/null sudo ln -s /opt/jdk17/jvm/*/ /opt/openjdk-bin-17 sudo emerge dev-java/openjdk:17 sudo rm -rf /opt/jdk17 /opt/openjdk-bin-17 /var/db/pkg/dev-java/openjdk-bin-17 sudo rsync -rvP build/install-jdk21/ /opt/jdk21 sudo mkdir -p /var/db/pkg/dev-java/openjdk-bin-21 echo 21 | sudo tee /var/db/pkg/dev-java/openjdk-bin-21/SLOT > /dev/null sudo ln -s /opt/jdk21/jvm/*/ /opt/openjdk-bin-21 sudo emerge dev-java/openjdk:21 sudo rm -rf /opt/jdk21 /opt/openjdk-bin-21 /var/db/pkg/dev-java/openjdk-bin-21