jdk/src/windows/bin/java_md.c
changeset 1331 05e272c957d8
parent 1323 e14a3b3536cd
child 1776 33e9405ab91b
equal deleted inserted replaced
1330:71f496bafc66 1331:05e272c957d8
  1000  * The implementation for finding classes from the bootstrap
  1000  * The implementation for finding classes from the bootstrap
  1001  * class loader, refer to java.h
  1001  * class loader, refer to java.h
  1002  */
  1002  */
  1003 static FindClassFromBootLoader_t *findBootClass = NULL;
  1003 static FindClassFromBootLoader_t *findBootClass = NULL;
  1004 
  1004 
       
  1005 #ifdef _M_AMD64
       
  1006 #define JVM_BCLOADER "JVM_FindClassFromClassLoader"
       
  1007 #else
       
  1008 #define JVM_BCLOADER "_JVM_FindClassFromClassLoader@20"
       
  1009 #endif /* _M_AMD64 */
       
  1010 
  1005 jclass FindBootStrapClass(JNIEnv *env, const char *classname)
  1011 jclass FindBootStrapClass(JNIEnv *env, const char *classname)
  1006 {
  1012 {
  1007    HMODULE hJvm;
  1013    HMODULE hJvm;
  1008 
  1014 
  1009    if (findBootClass == NULL) {
  1015    if (findBootClass == NULL) {
  1010        hJvm = GetModuleHandle(JVM_DLL);
  1016        hJvm = GetModuleHandle(JVM_DLL);
  1011        if (hJvm == NULL) return NULL;
  1017        if (hJvm == NULL) return NULL;
  1012        /* need to use the demangled entry point */
  1018        /* need to use the demangled entry point */
  1013        findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
  1019        findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
  1014             "JVM_FindClassFromBootLoader");
  1020             JVM_BCLOADER);
  1015        if (findBootClass == NULL) {
  1021        if (findBootClass == NULL) {
  1016           JLI_ReportErrorMessage(DLL_ERROR4,
  1022           JLI_ReportErrorMessage(DLL_ERROR4, JVM_BCLOADER);
  1017               "JVM_FindClassBootLoader");
       
  1018           return NULL;
  1023           return NULL;
  1019        }
  1024        }
  1020    }
  1025    }
  1021    return findBootClass(env, classname, JNI_FALSE);
  1026    return findBootClass(env, classname, JNI_FALSE, (jobject)NULL, JNI_FALSE);
  1022 }
  1027 }
  1023 
  1028 
  1024 void
  1029 void
  1025 InitLauncher(boolean javaw)
  1030 InitLauncher(boolean javaw)
  1026 {
  1031 {