How to switch from Oracle to OpenJDK Java Runtime Environment
This article describes the steps required to replace Oracle Java Runtime Environment (JRE) to the OpenJDK equivalent.Â
Step 1 -Â Verify your Verba version and check the supported Java version and download the OpenJDK runtime as follows:Â
Verba version | Java version | Download link |
---|---|---|
8.x | Java SE 8 Runtime Environment 32 bit | https://adoptopenjdk.net/releases.html?variant=openjdk8&jvmVariant=hotspot#x32_win Choose the Download JRE option |
9.0, 9.1 and 9.2 | Java SE 8 Runtime Environment 64 bit | https://adoptopenjdk.net/releases.html?variant=openjdk8&jvmVariant=hotspot#x64_win Choose the Download JRE option |
9.3 or later | Java SE 11 Runtime Environment 64 bit | https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot#x64_win Choose the Download JRE option |
Step 2 -Â Copy the downloaded OpenJDK package (zip) to the Verba server and unzip it to the following folder depending on your Verba version. Make sure you copy only the content of the folder in the zip file where you can find the folders such as bin, conf, lib, etc. (ignore the folder which includes the name of the java version). You can choose to install Java to any other folder, but keep in mind that you have to configure the system accordingly.
Verba version | Recommended OpenJDK install folder |
---|---|
8.x | C:\Program Files (x86)\Java\OpenJDK |
9.x | C:\Program Files\Java\OpenJDK |
After the install, the folder structure should look like as follows:
C:\Program Files\Java\OpenJDK
C:\Program Files\Java\OpenJDK\bin
C:\Program Files\Java\OpenJDK\conf
C:\Program Files\Java\OpenJDK\lib
etc.
Step 3 - Set/update the JAVA_HOME environmental variable to the install folder:
- Open Command Prompt (make sure you Run as administrator so you're able to add a system environment variable).
- Set the value of the environment variable to your OpenJDK JRE installation path as follows:
Verba 8.x | setx -m JAVA_HOME "C:\Program Files (x86)\Java\OpenJDK" |
Verba 9.x | setx -m JAVA_HOME "C:\Program Files\Java\OpenJDK" |
3. Restart Command Prompt to reload the environment variables then use the following command to check it's been added correctly:Â
echo %JAVA_HOME%
4. You should see the path to your JRE installation.Â
Step 4 - Add the install/bin folder to the PATH environmental variable:
- Open Command Prompt (make sure you Run as administrator so you're able to add a system environment variable).
- Set the value of the environment variable to your OpenJDK JRE installation path as follows:
Verba 8.x | setx -m PATH "C:\Program Files (x86)\Java\OpenJDK\bin;%PATH%" |
Verba 9.x | setx -m PATH "C:\Program Files\Java\OpenJDK\bin;%PATH%" |
3. Restart Command Prompt to reload the environment variables then use the following command to check it's been added correctly:Â
echo %PATH%
4. You should see the path to your JRE installation.Â
Step 5 -Â Change the following Windows Registry setting:
HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\VerbaWebApp\Parameters\Java\JvmÂ
to
Verba 8.x | C:\Program Files (x86)\Java\OpenJDK\bin\server\jvm.dll |
Verba 9.x | C:\Program Files\Java\OpenJDK\bin\server\jvm.dll |
Step 6 -Â Restart all Verba services using Java:
- Verba Cisco JTAPI Service
- Verba Avaya DMCC/JTAPI Service
- Verba Web Application Service
- Verba Cisco Central Silent Monitoring Service
- Verba Cisco Compliance Service
- Verba Cloud Compliance Service
Step 7 -Â Verify functionality by making tests covering your basic use cases.
Rolling back changes
In case the system does not work properly after switching to OpenJDK or you want to continue using Oracle JRE, follow the steps below to roll back the changes:
Step 1 -Â Verify that you have Oracle JRE still installed on the Verba server. If not, install the required Oracle JRE depending on the Verba version.
Step 2 -Â Change the JAVA_HOME and PATH variables back to the original values pointing to the Oracle JRE installation.
Step 3 - Change the HKLM\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\VerbaWebApp\Parameters\Java\Jvm registry setting back to 'auto'.
Step 4 -Â Restart all Java services using Java.