Retro68/gcc/libjava/testsuite/libjava.jni/findclass.c
Wolfgang Thaller aaf905ce07 add gcc 4.70
2012-03-28 01:13:14 +02:00

13 lines
306 B
C

#include <stdlib.h>
#include <findclass.h>
JNIEXPORT jclass JNICALL
Java_findclass_doit (JNIEnv *env, jclass klass, jstring name)
{
const char *buf = (*env)->GetStringUTFChars (env, name, NULL);
jclass k = (*env)->FindClass (env, buf);
(*env)->ReleaseStringUTFChars (env, name, buf);
return k;
}