android Programming Glossary: noname
FindClass from any thread in Android JNI http://stackoverflow.com/questions/13263340/findclass-from-any-thread-in-android-jni The class that I'm trying to access from native c c is com noname TestClient . Inside myFindClass I also use env FindClass and.. the issue. 1 inside JNI_OnLoad thread myFindClass env com noname TestClient ... inside native thread created by pthread_create.. thread created by pthread_create myFindClass env com noname TestClient I get this logcat myFindClass com noname TestClent..
FindClass from any thread in Android JNI http://stackoverflow.com/questions/13263340/findclass-from-any-thread-in-android-jni env className that uses cached ClassLoader loadClass . The class that I'm trying to access from native c c is com noname TestClient . Inside myFindClass I also use env FindClass and log value that it returns jclass myFindClass JNIEnv env const.. c0 c1 ... Then I have these 3 combinations to explain the issue. 1 inside JNI_OnLoad thread myFindClass env com noname TestClient ... inside native thread created by pthread_create myFindClass env com noname TestClient I get this logcat myFindClass.. thread myFindClass env com noname TestClient ... inside native thread created by pthread_create myFindClass env com noname TestClient I get this logcat myFindClass com noname TestClent c0 0x41b64558 c1 0x41b64558 c0 and c1 are same 1 ... myFindClass..
|