Starting Java
The first time a jvmcall<type> function is called from a model in a Mosel process, mosjvm will load and initialize a Java virtual machine. This Java virtual machine will then be used by all subsequent jvmcall<type> functions called by models in this process—if your Java functions modify any static fields, those modified values will be read by subsequent calls, possibly from different models. If you are using mosjvm from multiple submodels within the same Mosel instance, your Java code will need to be threadsafe.
By default, mosjvm will look for the Java Runtime Environment in the following locations:
- The folder specified by the MOSJVM_JAVA_HOME environment variable, if set
- The folder specified by the JAVA_HOME environment variable, if set
- Relative to the location of a java executable found in a folder on the PATH environment variable
- In some common install locations
To force mosjvm to use a specific installation of Java, set the environment variable MOSJVM_JAVA_HOME before starting Mosel.
© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.