HI All, While implementing Invocation API for DRLVM I ran into interesting situation. Assume we are in native code and just created VM by JNI_CreateJavaVM(). The next step is to call Class.forName(name) method through JNI. If you look at forName method implementation you will find it calls org.apache....VMStack.getCallerClass(0). Which means it wants to get the caller's class of the forName() method. In that case we get null since forName was called from native code. Later Class.forName(name) method passes obtained class to org.apache...VMStack.getClassLoader(j.l.Class) method to get caller's class loader.
The question is: What class loader should be returned in that case? I think we need to return current thread's context class loader in that case. So it will be bootstrap class loader for any thread attached through AttachCurrentThread except main thread which has system class loader as its context class loader. Any ideas? Evgueni --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]