Openfire Service with custom JAVA

We are using Openfire v4.7.5 with our OpenJDK 11 copied in the local folder. While trying to run Openfire as a service, it always takes the precedence of the JDK installed in the local machine instead of our own OpenJDK folder.

Used the following command to install as a windows service:

  • Openfire/bin/openfire-service.exe /install
  • Openfire/bin/openfire-service.exe /start

Once the service is started, log into the admin console to check the java used with Openfire. it shows the installed java8 instead of OpenJDK 11.

APPROACHES TRIED:

Approach 1 :Setting JAVA_HOME in the system environment variable to our OpenJDK folder.
Result: it’s working and mapped our OpenJDK folder. But we don’t want to set JAVA_HOME in the env file.

Approach 2 : Tried copying entire OpenJDK folder inside Openfire as JRE.
Result: It’s working, but we don’t want to copy entire JDK to Openfire folder, as its already available in another location in same machine.

Please suggest an approach to map OpenJDK folder to Openfire when running as a service.

Hello Rakesh,

I assume that @Mohana_Priya_E2 is your colleague, as you’re sharing the same domain and are asking the same question.

Please refer to the original thread in https://discourse.igniterealtime.org/t/openjdk-not-mapping-to-openfire/

I’m going to lock this thread, to avoid duplication.

Duplicate of https://discourse.igniterealtime.org/t/openjdk-not-mapping-to-openfire/