Neo4j 5 RPM java-17 dependency concern

The neo4j-5.26.20 Linux RPM package has dependency to java-17 even though 5.14 supports Java 21. I see no reason to run Java 17 when there are newer versions of Java available.

According to the documentation, in order to use Oracle Java instead, you are able to download and install a dummy RPM package that fakes a java-17 installation. I suppose you can use the same hack if you want to use Java 21 instead. Another option would be to install with --nodeps. In my opinion none of the options are very elegant.

Wouldn't it be better to skip the Java dependency all together?

I want to package my application that uses Neo4j 5 build and Java 21 and I would like the installation of Neo4j to be as clean as possible.

This is a bug in the deb/rpm installers for 5.26 and the same bug exists in the latest 2026.x versions too.
I did however fix this last week so 5.26.22 and 2026.02 (once they've been released) will have package dependencies on the correct, later javas.

In debian land it's not so much of a problem because the packages are backwards compatible, so a java 21 package will satisfy a java-17 dependency. No such luck in redhat though.

Thanks, does that mean you are changing to a general java dependency that accepts any Java version later than 17?

Will you also update the neo4j-java-adapter.rpm package for offline installation in combination with Oracle Java? I assume it is still needed for Oracle Java installations.

does that mean you are changing to a general java dependency that accepts any Java version later than 17?

No, we only test 5.26 against javas 17 and 21 so we aren't making Neo4j compatible with javas other than those.
Your package manager may choose to install later javas to satisfy the package dependencies, but neo4j will only actually run against the 17 or 21 java runtimes (it gives an error if an incorrect runtime is used).

The behaviour of package managers is outside of our control, and there's only so much we can do to stop that from happening.

Will you also update the neo4j-java-adapter.rpm package for offline installation in combination with Oracle Java? I assume it is still needed for Oracle Java installations.

The short answer is no, because it is not needed for Oracle Java 21 or 25.

The longer answer is that the java adapter was a workaround for (what I consider to be) a bug in the Oracle Java RPM package. They fixed the bug.
I don't want to get into the weeds about java rpm package metadata, but for java 17 and earlier, basically every java distribution except Oracle there was a consistent package name you could depend on so that yum/dnf package manager could resolve java dependencies properly. The adapter was an empty package that provided that package name based off an Oracle Java install.

Thanks, that is important information! I assume that you will also accept java 25 after you have qualified it in later 5.x versions? Would be great to know since we want to move to the latest Java LTS version as soon as possible.

Great that Oracle Java finally fixed the bug and that the adapter is not needed anymore.