Initializing help system before first use

Introduction

The mosjvm module allows you to create a Java virtual machine within the same process running Mosel, and call static Java methods from within a Mosel model. For example:

javaReturnString :=
  jvmcallstr('com.fico.testpackage.TestClass.myTestFunction', functionArg1, functionArg2,
             functionArg3)

writeln("2+5=",
        jvmcallint('com.fico.testpackage.SimpleMathOperations.addTwoValues', 2, 5))

In this way, you can interact with pre-existing Java libraries from your Mosel model. However, please note that there are some drawbacks to instantiating a Java virtual machine in the same process as the Mosel virtual machine, and developers are advised to consider other approaches (for example: deploying your Java classes to a Tomcat webserver and interacting with them using standard webservice requests) before building a solution based upon mosjvm.

The developer is advised to read the later chapter which goes into some detail about the limitations of this module. But the most major limitations to be aware of are:

  • This module is only available for Windows and Linux.
  • This module can not be used within the FICO Analytic Cloud.
  • Java 8 or 11 must be installed on the machine running the model. Other versions of Java are not supported at this time. Distributions other than Oracle Java, OpenJDK and Amazon Corretto are not supported.
  • This module can only run compiled Java .class files (either directly as files or built into a .jar). Java source code must be compiled by other tools.

© 2001-2019 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.