in src/main/cpp/launcher/windows/src/JavaUtils.c [766:806]
void findSystemJava(LauncherProperties *props) {
// install bundled JVMs if any
if(isTerminated(props)) return;
installBundledJVMs(props);
if(!isOK(props) || isTerminated(props)) return;
// search in <installation folder>/bin/jre
if(props->java==NULL) {
writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in installation folder", 1);
searchJavaInstallationFolder(props);
}
// search JVM in the system paths
if(props->java==NULL) {
writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in the system paths", 1);
searchJavaSystemLocations(props);
}
if(isTerminated(props)) return;
if(props->java==NULL) {
writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in environment variables", 1);
searchJavaFromEnvVariables(props);
}
if (isTerminated(props)) return;
if (props->java == NULL) {
writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in executable paths", 1);
searchJavaOnPath(props);
}
// search JVM in the registry
if(isTerminated(props)) return;
if(props->java==NULL) {
if(IsWow64) {
writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in 64-bit registry", 1);
searchCurrentJavaRegistry(props, 1);
}
if(props->java==NULL) {
writeMessageA(props, OUTPUT_LEVEL_NORMAL, 0, "Search java in 32-bit registry", 1);
searchCurrentJavaRegistry(props, 0);
}
}
}