/* * com_example_killndk_Jni.c * * Created on: 2013-2-20 * Author: OverTime */ #include #include #include "com_example_killndk_Jni.h" int add2(){ int x,y; x = 1000; y = 8989; x += y; return x; } JNIEXPORT jint JNICALL Java_com_example_killndk_Jni_getCInt (JNIEnv *env, jobject thiz){ return add2(); } JNIEXPORT jstring JNICALL Java_com_example_killndk_Jni_getCString (JNIEnv *env, jobject thiz){ (*env)->NewStringUTF(env," HelloNDK ----->>"); }