nYou can use the
(*env)->NewStringUTF() function to create a new jstring from a C-style string. For example, a C
function that needs to return a Java
string could contain the following code:
JNIEXPORT jstring
JNICALLJava_MyJavaClass_getName(JNIEnv *env, jobject obj)
{
return (*env)->NewStringUTF(env, “Fred
Flintstone”);
}