6981001: (launcher) EnsureJREInstallation is not being called in order
Reviewed-by: darcy
diff --git a/src/windows/bin/java_md.c b/src/windows/bin/java_md.c
index 62cc300..abd887c 100644
--- a/src/windows/bin/java_md.c
+++ b/src/windows/bin/java_md.c
@@ -105,15 +105,15 @@
         exit(1);
     }
 
-    /* Do this before we read jvm.cfg */
-    EnsureJreInstallation(jrepath);
-
     /* Find out where the JRE is that we will be using. */
     if (!GetJREPath(jrepath, so_jrepath)) {
         JLI_ReportErrorMessage(JRE_ERROR1);
         exit(2);
     }
 
+    /* Do this before we read jvm.cfg and after jrepath is initialized */
+    EnsureJreInstallation(jrepath);
+
     /* Find the specified JVM type */
     if (ReadKnownVMs(jrepath, (char*)GetArch(), JNI_FALSE) < 1) {
         JLI_ReportErrorMessage(CFG_ERROR7);
@@ -213,6 +213,7 @@
     }
     /* Does our bundle directory exist ? */
     JLI_Snprintf(tmpbuf, sizeof(tmpbuf), "%s\\lib\\bundles", jrepath);
+    JLI_TraceLauncher("EnsureJreInstallation: %s\n", tmpbuf);
     if (stat(tmpbuf, &s) != 0) {
         return;
     }