首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

NDK中char*怎么转换成jstring

2012-11-03 
NDK中char*如何转换成jstringJNIEXPORT jstring JNICALLJava_Test_TestString( JNIEnv *env, jobject obj

NDK中char*如何转换成jstring

JNIEXPORT jstring JNICALL
Java_Test_TestString( JNIEnv *env, jobject obj )
{
char *buf = (char*)malloc(10);
strcpy(buf, "Testing 1");
jstring jstrBuf = (*env)->NewStringUTF(env, buf);
}

热点排行
Bad Request.