Openjdk version on centos 7

I’m trying to upgrade openfire 4.7.5 to 4.8.0 beta on a CentOS 7 server but it says I need a newer openjdk version. I currently have 1.8.0 but it needs 1.11.0. I tried installing java-11-openjdk-devel (and java -version shows “openjdk version 11.0.21”) but it still says it needs 1.11. Where can I download the correct openjdk version?

what does alternatives --config java report? Do you have a $JAVA_HOME manually set in /etc/sysconfig/openfire ?

root@intranet ~$ alternatives --config java

There are 2 programs which provide ‘java’.

  • 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-
  • 2 java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-

Enter to keep the current selection[+], or type selection number: 2

root@intranet ~$ java -version
openjdk version “11.0.21” 2023-10-17 LTS
OpenJDK Runtime Environment (Red_Hat- (build 11.0.21+9-LTS)
OpenJDK 64-Bit Server VM (Red_Hat- (build 11.0.21+9-LTS, mixed mode, sharing)

JAVA_HOME (and all other options as well) is commented out in /etc/sysconfig/openfire

And Openfire still does not start after setting 2 above?

4.8.0-0.2.beta won’t even install, saying it’s missing dependencies ( >= java 1:11.0.0).

We’ve had some troubles in the past with RPM requirements. You can try skipping those with --no-deps or whatever the yum/rpm equivalent is for centos 7. You may also try installing java-11-openjdk-headless

1 Like

Thanks. I ended up using “rpm -Uvh --nodeps”. The service starts and I can connect to the admin console and with Spark so we’ll see how it goes.