jdk/src/windows/bin/java_md.c
changeset 3834 16342ebd576d
parent 3111 fefdeafb7ab9
child 5381 d6d64a42ff51
equal deleted inserted replaced
3833:b666ed188811 3834:16342ebd576d
  1091  * The implementation for finding classes from the bootstrap
  1091  * The implementation for finding classes from the bootstrap
  1092  * class loader, refer to java.h
  1092  * class loader, refer to java.h
  1093  */
  1093  */
  1094 static FindClassFromBootLoader_t *findBootClass = NULL;
  1094 static FindClassFromBootLoader_t *findBootClass = NULL;
  1095 
  1095 
  1096 #ifdef _M_AMD64
       
  1097 #define JVM_BCLOADER "JVM_FindClassFromClassLoader"
       
  1098 #else
       
  1099 #define JVM_BCLOADER "_JVM_FindClassFromClassLoader@20"
       
  1100 #endif /* _M_AMD64 */
       
  1101 
       
  1102 jclass FindBootStrapClass(JNIEnv *env, const char *classname)
  1096 jclass FindBootStrapClass(JNIEnv *env, const char *classname)
  1103 {
  1097 {
  1104    HMODULE hJvm;
  1098    HMODULE hJvm;
  1105 
  1099 
  1106    if (findBootClass == NULL) {
  1100    if (findBootClass == NULL) {
  1107        hJvm = GetModuleHandle(JVM_DLL);
  1101        hJvm = GetModuleHandle(JVM_DLL);
  1108        if (hJvm == NULL) return NULL;
  1102        if (hJvm == NULL) return NULL;
  1109        /* need to use the demangled entry point */
  1103        /* need to use the demangled entry point */
  1110        findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
  1104        findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
  1111             JVM_BCLOADER);
  1105             "JVM_FindClassFromBootLoader");
  1112        if (findBootClass == NULL) {
  1106        if (findBootClass == NULL) {
  1113           JLI_ReportErrorMessage(DLL_ERROR4, JVM_BCLOADER);
  1107           JLI_ReportErrorMessage(DLL_ERROR4, "JVM_FindClassFromBootLoader");
  1114           return NULL;
  1108           return NULL;
  1115        }
  1109        }
  1116    }
  1110    }
  1117    return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
  1111    return findBootClass(env, classname);
  1118 }
  1112 }
  1119 
  1113 
  1120 void
  1114 void
  1121 InitLauncher(boolean javaw)
  1115 InitLauncher(boolean javaw)
  1122 {
  1116 {