Jvalue
jvalue is a union type used in the Java Native Interface (JNI) to pass arguments from native code to Java methods. Defined in the JNI header jni.h, it can hold every Java value that can be passed as a parameter, including all primitive types and object references. The fields typically named z, b, c, s, i, j, f, d, and l correspond to boolean, byte, char, short, int, long, float, double, and a Java object reference (jobject), respectively. Only one field in each jvalue element is valid at a time.
In practice, jvalue is used with the A-variant JNI calls, such as Call<Type>MethodA, CallStatic<Type>MethodA, and NewObjectA.
(*env)->CallVoidMethodA(env, obj, methodID, args);
Notes: Use the correct field for each parameter type and ensure the array remains valid for the