1#include <jni.h> 2#include <stdio.h> 3#include <stdlib.h> 4 5#ifdef __cplusplus 6extern "C" { 7#endif 8 9JNIEXPORT jint JNICALL Java_UseNativeLib_getRandom(JNIEnv *env, jobject obj) { 10 return rand(); 11} 12 13#ifdef __cplusplus 14} 15#endif 16 17