首页 > 学院 > 开发设计 > 正文

Java核心代码例程之:JNIExample.cpp

2019-11-18 15:14:37
字体:
来源:转载
供稿:网友

#include "JNIExample.h"

/**
* This method just returns the string "Hello World from JNI!" to the caller
* Parameters:
* env - JNI Environment pointer
* obj - Invoking object
* Returns:
* A string
**/
extern "C" JNIEXPORT jstring JNICALL java_JNIExample_sayHello
( JNIEnv *env, jobject obj ) {
return env->NewStringUTF( "Hello World from JNI!" );
}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表