
8.4. Summing up 313
function in the native library. The method in class CRsf; (listing 8.21) is used
to illustrate h ow to call a static metho d in a class that has not been instantiated
with any objects. Method onCallNative1 passes a text string to the native
function helloLog. Method onCallNative2 pass es two integer s to the native
function getString that return s a string. Method onCallNative3 calls the
native function setup that calls back to the two JAVA method s : onRSFinstance
and onRSFstatic.
Listing 8.22 contains two functions. The first JNI OnLoad() is called when-
ever the native library is loaded and affords the developer the opportunity