Use case - A customer has reported an issue while replacing Oracle JDK with Open JDK on their Campaign instances running on Windows.
They currently have Oracle JDK v184.108.40.206 installed on all their Windows Campaign instances. Still, after replacing Oracle JDK with Open JDK in one of their Campaign instances, the WEB has failed to start with the following error:
JVM-510037 Cannot find the Java dynamic library. Check that a JDK or a JRE is installed on the machine. (iRc=-53)
However, Java is correctly installed with the right Path and JAVA_HOME environment variables.
In order to run the Web module, the JVM dynamic library must be visible to Campaign. By removing Oracle JDK, the JavaSoft key from the Windows registry is removed and any references to that JVM library is also lost.
There are 2 solutions to resolve this issue:
Here’s an example (with OpenJDK 1.8_292) of what you need to add:
Windows Registry Editor Version 5.00
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment "CurrentVersion"="1.8" "BrowserJavaVersion"="11.301.2"
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8 "MicroVersion"="0" "RuntimeLib"="C:\\Users\\perth\\Java\\openjdk-8u292-b10\\jre\\bin\\server\\jvm.dll" "JavaHome"="C:\\Users\\perth\\Java\\openjdk-8u292-b10\\jre"
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8.0_292 "MicroVersion"="0" "RuntimeLib"="C:\\Users\\perth\\Java\\openjdk-8u292-b10\\jre\\bin\\server\\jvm.dll" "JavaHome"="C:\\Users\\perth\\Java\\openjdk-8u292-b10\\jre"
The Web module should be able to start as expected:
The variables are:
Here’s an example:
Please note that the usage of the JVMLIBDIR will be visible from the log if the verbose logging is enable on the Web module.