jdk/src/windows/bin/java_md.c
changeset 1323 e14a3b3536cd
parent 1145 404b11752c57
child 1331 05e272c957d8
--- a/jdk/src/windows/bin/java_md.c	Wed Sep 24 15:19:07 2008 +0200
+++ b/jdk/src/windows/bin/java_md.c	Wed Sep 24 15:07:41 2008 -0700
@@ -993,9 +993,34 @@
     return rslt;
 }
 
-/* Linux only, empty on windows. */
+/* Unix only, empty on windows. */
 void SetJavaLauncherPlatformProps() {}
 
+/*
+ * The implementation for finding classes from the bootstrap
+ * class loader, refer to java.h
+ */
+static FindClassFromBootLoader_t *findBootClass = NULL;
+
+jclass FindBootStrapClass(JNIEnv *env, const char *classname)
+{
+   HMODULE hJvm;
+
+   if (findBootClass == NULL) {
+       hJvm = GetModuleHandle(JVM_DLL);
+       if (hJvm == NULL) return NULL;
+       /* need to use the demangled entry point */
+       findBootClass = (FindClassFromBootLoader_t *)GetProcAddress(hJvm,
+            "JVM_FindClassFromBootLoader");
+       if (findBootClass == NULL) {
+          JLI_ReportErrorMessage(DLL_ERROR4,
+              "JVM_FindClassBootLoader");
+          return NULL;
+       }
+   }
+   return findBootClass(env, classname, JNI_FALSE);
+}
+
 void
 InitLauncher(boolean javaw)
 {