Explanation
The JNIEnv
type is a pointer to a structure storing all JNI function pointers.
The env pointer is the first argument of every native method.
The JNI_CreateJavaVM()
function loads and initializes a Java VM and fills in a pointer jvm
to virtual machine and a pointer env to the execution environment.
The FindClass()
method is used to load a class.
The GetStaticMethodID()
returns the identifier of a static method in a class.
The CallStaticVoidMethod()
calls the main method of the MyFrame
class.
The DestroyJavaVM()
method unloads a Java virtual machine and reclaims resources.
|