Advertisement
Guest User

Untitled

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