This function localizes and loads a class.
It is equivalent to the JNI function FindClass
.
Call
CALL 'JCI_FindClass' USING
cName cObj
cName | Name of the class |
cObj | Class object returned by the function |
Arguments
cName | Structure of the type |
cObj | Data field of the type |
Return value (RETURN-CODE)
JCI-RET-OK
The call was successful.
JCI-RET-ENOVM
No Java VM has been started.
JCI-RET-ENOTFOUND
The class could not be loaded.
Exceptions
The exceptions generated by the function correspond to those of the JNI function FindClass
.
Example
DATA DIVISION. WORKING-STORAGE SECTION. COPY JCI-TYPEDEFS. 01 JCIConstants. COPY JCI-CONST. ... 01 className. 02 PIC S9(9) USAGE COMP-5 VALUE 30. 02 PIC X(30) VALUE 'Hello'. ... 01 classObj TYPE JCI-object. ... PROCEDURE DIVISION. ... CALL 'JCI_FindClass' USING className classObj IF RETURN-CODE NOT = JCI-RET-OK ...