findclass.c 306 Bytes
Newer Older
Tom Tromey committed
1 2 3 4
#include <stdlib.h>

#include <findclass.h>

5
JNIEXPORT jclass JNICALL
Tom Tromey committed
6 7 8 9 10 11 12
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;
}