diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2019-02-25 09:48:40 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2019-02-25 09:49:11 +0200 |
commit | 1734a5b44f3dfda13c07d6d9b7e7a42a1103ff3b (patch) | |
tree | d99f2c75f98be2bb0a546a0a9eb9ce85e570c69c | |
parent | 69db6f1f195817079e08ee1f0225ac77ce5ca392 (diff) |
java: implement classloader findclass
-rw-r--r-- | src/libjvm-java.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libjvm-java.c b/src/libjvm-java.c index cf13544..e07b339 100644 --- a/src/libjvm-java.c +++ b/src/libjvm-java.c @@ -85,6 +85,15 @@ java_lang_ClassLoader_findLibrary(JNIEnv *env, jobject object, va_list args) } jobject +java_lang_ClassLoader_findClass(JNIEnv *env, jobject object, va_list args) +{ + assert(env && object); + jstring str = va_arg(args, jstring); + const char *utf = (*env)->GetStringUTFChars(env, str, NULL); + return (*env)->FindClass(env, utf); +} + +jobject java_lang_Class_getClassLoader(JNIEnv *env, jobject object) { assert(env && object); |