Old Java LTS versions unavailable on F42

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?

Thanks in advance

2 Likes

It looks like this change:

The wiki page includes information on using the Adoptium Temurin repositories etc.

2 Likes

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).

The repository offers the following packages:
 temurin-11-jdk.x86_64: Eclipse Temurin 11 JDK
 temurin-11-jre.x86_64: Eclipse Temurin 11 JRE
 temurin-17-jdk.x86_64: Eclipse Temurin 17 JDK
 temurin-17-jre.x86_64: Eclipse Temurin 17 JRE
 temurin-21-jdk.x86_64: Eclipse Temurin 21 JDK
 temurin-21-jre.x86_64: Eclipse Temurin 21 JRE
 temurin-23-jdk.x86_64: Eclipse Temurin 23 JDK
 temurin-23-jre.x86_64: Eclipse Temurin 23 JRE
 temurin-24-jdk.x86_64: Eclipse Temurin 24 JDK
 temurin-24-jre.x86_64: Eclipse Temurin 24 JRE
 temurin-8-jdk.x86_64: Eclipse Temurin 8 JDK
 temurin-8-jre.x86_64: Eclipse Temurin 8 JRE

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_64JAVA_HOME=/usr/lib/jvm/temurin-8-jdk

Everything seems to be working fine now, thanks for the help!

2 Likes

@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?

Ah, is it not using the alternatives system that the Java packages used to use before?

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.

1 Like

I could not find the instructions to properly enable this repo anywhere. I used the following command

dnf config-manager setopt adoptium-temurin-java-repository.enabled=1

From there I installed the old jdks I needed

dnf install temurin-11-jdk temurin-17-jdk temurin-21-jdk temurin-8-jdk

Is there a better way to enable the repo?

1 Like

To enable the Adoptium repository, I simply used the Settings page inside Discover.

The commands you mentioned do the exact same thing as flagging the repo as active and applying the config.

1 Like

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.