src/share/vm/prims/jvm.cpp

changeset 670
9c2ecc2ffb12
parent 631
d1605aabd0a1
parent 661
d5ba4f8aa38a
child 791
1ee8caae33af
     1.1 --- a/src/share/vm/prims/jvm.cpp	Thu Jul 03 11:01:32 2008 -0700
     1.2 +++ b/src/share/vm/prims/jvm.cpp	Fri Jul 11 01:14:44 2008 -0700
     1.3 @@ -624,6 +624,30 @@
     1.4    if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
     1.5  JVM_END
     1.6  
     1.7 +// Rationale behind JVM_FindClassFromBootLoader
     1.8 +// a> JVM_FindClassFromClassLoader was never exported in the export tables.
     1.9 +// b> because of (a) java.dll has a direct dependecy on the  unexported
    1.10 +//    private symbol "_JVM_FindClassFromClassLoader@20".
    1.11 +// c> the launcher cannot use the private symbol as it dynamically opens
    1.12 +//    the entry point, so if something changes, the launcher will fail
    1.13 +//    unexpectedly at runtime, it is safest for the launcher to dlopen a
    1.14 +//    stable exported interface.
    1.15 +// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its
    1.16 +//    signature to change from _JVM_FindClassFromClassLoader@20 to
    1.17 +//    JVM_FindClassFromClassLoader and will not be backward compatible
    1.18 +//    with older JDKs.
    1.19 +// Thus a public/stable exported entry point is the right solution,
    1.20 +// public here means public in linker semantics, and is exported only
    1.21 +// to the JDK, and is not intended to be a public API.
    1.22 +
    1.23 +JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
    1.24 +                                              const char* name,
    1.25 +                                              jboolean throwError))
    1.26 +  JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name,
    1.27 +              throwError ? "error" : "exception");
    1.28 +  return JVM_FindClassFromClassLoader(env, name, JNI_FALSE,
    1.29 +                                      (jobject)NULL, throwError);
    1.30 +JVM_END
    1.31  
    1.32  JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
    1.33                                                 jboolean init, jobject loader,

mercurial