Hello,
Today I updated my system from Fedora 41 KDE Spin to Fedora 42 using Discover.
Everything looked fine, but when it was time to use some Java application I needed, I discovered that the package java-1.8.0-openjdk.x86_64 had been removed during the update (the last time I used the app was just before the reboot).
That was odd, but since I didn’t have much time to investigate, I simply tried reinstalling it, but DNF doesn’t find it in the default repositories. (dnf search openjdk only returns latest and java-21).
Does anyone know what could have happened? To fix this, I could probably just add the official repo from Adoptium, but it seems strange for these LTS packages to be missing from the Fedora 42 - x86_64 repo.
Eventually, can someone tell me where to find the update logs to check for errors?
Yep, I can confirm that this was the issue.
The package was probably removed because it was marked as orphaned.
There is this new package adoptium-temurin-java-repository, which automatically configures the repository from Adoptium. It was installed by default, but the repository was not active (just like it says on the page you linked).
After enabling the repository, I was able to easily install temurin-8-jdk, along with IcedTea-Web which was removed as well, probably because it lost its dependencies.
The only tedious part was fixing up all the ENV variables I used to select the appropriate version for each program, like this: JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk.x86_64 → JAVA_HOME=/usr/lib/jvm/temurin-8-jdk
Everything seems to be working fine now, thanks for the help!
@ankursinha I’d like to ask one more thing, since I have never had similar issues before:
Does the upgrade tool never warn the user about the orphaned packages that are going to be removed? Should I always use dnf system-upgrade instead in order to have a verbose output?
alternatives lists both OpenJDK and Temurin java versions without issues:
sudo alternatives --config java
There are 3 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-21-openjdk/bin/java
2 /usr/lib/jvm/temurin-8-jdk/bin/java
3 /usr/lib/jvm/temurin-17-jdk/bin/java
It’s the software that I need to run that is old and needs to be launched with a specific version in order to work, so I have Java 21 as default for everything and I change the path just for those specific programs.
This worked perfectly for me, thanks! I needed java jdk 17 for running my minecraft server (1.20.4). After upgrading to Fedora Server 42, I already had the temurin repository but needed to enable it like you described and then was able to get temurin-17-jdk and now everything’s working again.