Are the two cases same otherwise, ie the same way of loading the library and such? Looks like you have the default class loader in the second case. think you would benefit by reading up on the JNI doc on the Oracle site which deals with this specific issue.
jint result = jvm->AttachCurrentThread(&env, NULL);
jclass g_jClazz = env->FindClass("Test/service/TestJni");
jvm->GetEnv(&env, JNI_VERSION_1_6);
Are the two cases same otherwise, ie the same way of loading the library and such? Looks like you have the default class loader in the second case. think you would benefit by reading up on the JNI doc on the Oracle site which deals with this specific issue.
On Oct 6, 2010 7:58 AM, "z0r" <michiel...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
2010/10/6 z0r <michiel...@gmail.com>:
if AttachCurrentThread
isn't thread safe (is it?).
So how do I tell the VM that I want a particular class to be loader?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
I assume you mean:
http://groups.google.com/group/android-ndk/browse_thread/thread/da092bd665ca9ff1
In this thread you mention a "FAQ: FindClass didn't find my class".
But I cannot find this section in the JNI tips doc on Dalvik git:
http://android.git.kernel.org/?p=platform/dalvik.git;a=blob_plain;f=docs/jni-tips.html;hb=HEAD
Where is the most up-to-date JNI Tips document?
--
Olivier