When you install isCOBOL, it asks you for the location of the Java installation, and saves this path in a file or files. Then all the executable wrappers installed in the %isCOBOL%/bin folder look for this file to find Java.
If you install a new version or type of Java (OracleJDK to OpenJDK, for instance), you just need to change the path saved in this file to redirect all of the wrappers to the new Java. The path should be changed in two places, one for the compiler and one for the runtime.
This file is named and located in different place in the Windows and UNIX/Linux installations:
The compiler uses a batch file to set the JDK path. Open %ISCOBOL%\bin\isshell.bat in a text editor, and change the value of ISCOBOL_JDK_ROOT and ISCOBOL_JRE_ROOT to your new Java installation.
For example, in C:\Veryant\isCOBOL_SDK2022R2\bin\isshell.bat, change these two lines:
set ISCOBOL_JDK_ROOT=C:\Program Files\Java\OpenJ9_80.232.09
set ISCOBOL_JRE_ROOT=C:\Program Files\Java\OpenJ9_80.232.09
The Runtime and other products and utilities use a file called pref_jre.cfg.
Change the java path in the "pref_jre.cfg" file (%ISCOBOL%\.install4j\pref_jre.cfg).
For example, in C:\Veryant\isCOBOL2020R1\.install4j\pref_jre.cfg, change the existing line
Change the java path in the "default_java.conf" file ($ISCOBOL/bin/default_java.conf).
For example, in /opt/isCOBOL2020R1/bin, open default_java.conf with vi, and change these lines: