2007-06-24 19:34:07 -06:00
|
|
|
#include "stdio.h"
|
|
|
|
#include "jni.h"
|
|
|
|
|
2007-06-29 10:42:39 -06:00
|
|
|
#undef JNIEXPORT
|
|
|
|
#define JNIEXPORT __attribute__ ((visibility("default")))
|
|
|
|
|
2007-06-24 19:34:07 -06:00
|
|
|
extern "C" JNIEXPORT void JNICALL
|
2007-06-29 10:42:39 -06:00
|
|
|
Java_java_lang_System_00024Output_println(JNIEnv* e, jobject, jstring s)
|
2007-06-24 19:34:07 -06:00
|
|
|
{
|
|
|
|
jboolean isCopy;
|
|
|
|
const char* chars = e->GetStringUTFChars(s, &isCopy);
|
|
|
|
if (chars) {
|
2007-06-29 10:42:39 -06:00
|
|
|
printf("%s\n", chars);
|
2007-06-24 19:34:07 -06:00
|
|
|
}
|
|
|
|
e->ReleaseStringUTFChars(s, chars);
|
|
|
|
}
|