src/share/vm/prims/jvm.cpp

changeset 791
1ee8caae33af
parent 777
37f87013dfd8
parent 670
9c2ecc2ffb12
child 823
f008d3631bd1
     1.1 --- a/src/share/vm/prims/jvm.cpp	Wed Aug 06 11:57:31 2008 -0400
     1.2 +++ b/src/share/vm/prims/jvm.cpp	Thu Aug 21 23:36:31 2008 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
     1.6 + * Copyright 1997-2008 Sun Microsystems, Inc.  All Rights Reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -628,6 +628,30 @@
    1.11    if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
    1.12  JVM_END
    1.13  
    1.14 +// Rationale behind JVM_FindClassFromBootLoader
    1.15 +// a> JVM_FindClassFromClassLoader was never exported in the export tables.
    1.16 +// b> because of (a) java.dll has a direct dependecy on the  unexported
    1.17 +//    private symbol "_JVM_FindClassFromClassLoader@20".
    1.18 +// c> the launcher cannot use the private symbol as it dynamically opens
    1.19 +//    the entry point, so if something changes, the launcher will fail
    1.20 +//    unexpectedly at runtime, it is safest for the launcher to dlopen a
    1.21 +//    stable exported interface.
    1.22 +// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its
    1.23 +//    signature to change from _JVM_FindClassFromClassLoader@20 to
    1.24 +//    JVM_FindClassFromClassLoader and will not be backward compatible
    1.25 +//    with older JDKs.
    1.26 +// Thus a public/stable exported entry point is the right solution,
    1.27 +// public here means public in linker semantics, and is exported only
    1.28 +// to the JDK, and is not intended to be a public API.
    1.29 +
    1.30 +JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
    1.31 +                                              const char* name,
    1.32 +                                              jboolean throwError))
    1.33 +  JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name,
    1.34 +              throwError ? "error" : "exception");
    1.35 +  return JVM_FindClassFromClassLoader(env, name, JNI_FALSE,
    1.36 +                                      (jobject)NULL, throwError);
    1.37 +JVM_END
    1.38  
    1.39  JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
    1.40                                                 jboolean init, jobject loader,

mercurial