isCOBOL Evolve : Introduction : Wrappers : JVM and SDK libraries association
JVM and SDK libraries association
Every wrapper starts a JVM (Java Virtual Machine) in order to execute the corresponding class.
The rules behind the search for the java executable file are slightly different between Windows and other platforms.
The rules behind the search of the SDK libraries are slightly different as well.
Windows
All the Windows wrappers except iscc.exe look for the JVM specified by the pref_jre.cfg file in the .install4j directory of the isCOBOL SDK. The pref_jre.cfg file is generated by the isCOBOL installer according to the choice made by the user. If the pref_jre.cfg is not available, then the default JVM is used. The default JVM is the first among the ones returned by the where java command.
All the Windows wrappers except iscc.exe look for the libraries located in ..\lib from the directory where the wrapper is located (e.g. the bin directory of the isCOBOL SDK).
The iscc.exe wrapper looks for the JVM specified by the ISCOBOL_JDK_ROOT environment variable. If the ISCOBOL_JDK_ROOT environment variable is not set, iscc.exe doesn’t start.
The iscc.exe wrapper looks for the libraries located in %ISCOBOL%\lib. If the ISCOBOL environment variable is not set, iscc.exe doesn’t start.
Linux, MacOSX and other Unix
All the wrappers except iscc look for the JVM specified by the ISCOBOL_JRE_ROOT environment variable. If the ISCOBOL_JRE_ROOT environment variable is not set, then the default JVM is used. The default JVM is the first among the ones returned by the which java command.
The iscc wrapper looks for the JVM specified by the ISCOBOL_JDK_ROOT environment variable. If the ISCOBOL_JDK_ROOT environment variable is not set, then the default JVM is used. The default JVM is the one returned by the which java command.
All the wrappers look for the libraries located in $ISCOBOL\lib. If the ISCOBOL environment variable is not set, then they look for the libraries located in ..\lib from the directory where the wrapper is located (e.g. the bin directory of the isCOBOL SDK).
The ISCOBOL, ISCOBOL_JRE_ROOT and ISCOBOL_JDK_ROOT environment variables are set in a file named default_java.conf in the bin directory of the isCOBOL SDK. The default_java.conf file is generated by the isCOBOL installer according to the choice made by the user. If the default_java.conf is not available, then the wrappers look for the three environment variables in the system environment.