Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1.  
  2. #include <jni.h>
  3. #include <stdio.h>
  4. #include "abc.h"
  5.  
  6. #ifdef __cplusplus
  7.     extern "C"
  8.     {
  9. #endif
  10.  
  11.     JNIEXPORT void JNICALL
  12.  Java_ShowMessage_ShowMessage(JNIEnv* env, jobject obj, jstring jMsg)
  13.  
  14. {
  15.   const char* msg=env->GetStringUTFChars(jMsg,0);
  16.   printf("Thinking in Java, JNI: %s\n", msg);
  17.   env->ReleaseStringUTFChars(jMsg, msg);
  18. }
  19.  
  20. #ifdef __cplusplus
  21.     extern "C"
  22.     }
  23. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement