I notice that the OpenJDK build is only available as a .tar.gz and not as .rpm
This means that to upgrade from Oracle JDK10 -> Open JDK11, you'll have to write a script yourself to modify the symlinks e.g. to redirect the existing "/etc/alternatives/java -> /usr/java/jdk-10.0.x/bin/java" to the new installation. There are 46 of these symlinks that need changing (for javac, jstack, etc etc).
I hope that's the only change that is required and that I'm not missing something. Anyone know if there is anything else necessary?
Edit: here is the script I just wrote to print out the commands required to change the symlinks:
#!/bin/bash
existingJdkBinPath=$(dirname `readlink /etc/alternatives/java`)
newJdkPath="/opt/jdk-11"
find /etc/alternatives -type l | while read link; do
target=$(readlink "$link")
targetPath=$(dirname $target)
targetFile=$(basename $target)
if [[ $targetPath = $existingJdkBinPath ]]; then
newTarget="$newJdkPath/bin/$targetFile"
echo ln -snf "$newTarget" "$link"
fi
done
The OpenJDK build is GPL and should find its way into official package repositories. Oracle may have stopped creating the rpms for that reason.
Most distros use the IceTea builds for OpenJDK. Hmm . IceTea3 is Java8. There's no Java9 IceTea4 build yet. I can't find any roadmap info on their site ...
This means that to upgrade from Oracle JDK10 -> Open JDK11, you'll have to write a script yourself to modify the symlinks e.g. to redirect the existing "/etc/alternatives/java -> /usr/java/jdk-10.0.x/bin/java" to the new installation. There are 46 of these symlinks that need changing (for javac, jstack, etc etc).
I hope that's the only change that is required and that I'm not missing something. Anyone know if there is anything else necessary?
Edit: here is the script I just wrote to print out the commands required to change the symlinks: