src/windows/bin/java_md.c
char *
LocateJRE(manifest_info* info) {
    HKEY    key = NULL;
    char    *path;
    int     key_index;
    HKEY    root_keys[2] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };

    for (key_index = 0; key_index <= 1; key_index++) {
        if (RegOpenKeyEx(root_keys[key_index], JRE_KEY, 0, KEY_READ, &key)
          == ERROR_SUCCESS)
            if ((path = ProcessDir(info, key)) != NULL) {
                if (key != NULL)
                    RegCloseKey(key);
                return (path);
            }
        if (key != NULL)
            RegCloseKey(key);
    }
    return NULL;
}
/*
 * This is the global entry point. It examines the host for the optimal
 * JRE to be used by scanning a set of registry entries.  This set of entries
 * is hardwired on Windows as "Software\JavaSoft\Java Runtime Environment"
 * under the set of roots "{ HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE }".
 *
 * This routine simply opens each of these registry directories before passing
 * control onto ProcessDir().
 */
This is the global entry point. It examines the host for the optimal
JRE to be used by scanning a set of registry entries.  This set of entries
is hardwired on Windows as "Software\JavaSoft\Java Runtime Environment"
under the set of roots "{ HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE }".

This routine simply opens each of these registry directories before passing
control onto ProcessDir().
This is the global entry point . It examines the host for the optimal JRE to be used by scanning a set of registry entries . This set of entries is hardwired on Windows as " Software \ JavaSoft \ Java Runtime Environment " under the set of roots " { HKEY_CURRENT_USER HKEY_LOCAL_MACHINE } " . This routine simply opens each of these registry directories before passing control onto ProcessDir () .
char *
LocateJRE(manifest_info* info) {
    HKEY    key = NULL;
    char    *path;
    int     key_index;
    HKEY    root_keys[2] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };
    for (key_index = 0; key_index <= 1; key_index++) {
        if (RegOpenKeyEx(root_keys[key_index], JRE_KEY, 0, KEY_READ, &key)
          == ERROR_SUCCESS)
            if ((path = ProcessDir(info, key)) != NULL) {
                if (key != NULL)
                    RegCloseKey(key);
                return (path);
            }
        if (key != NULL)
            RegCloseKey(key);
    }
    return NULL;
}
char * LocateJRE ( manifest_info * info ) { HKEY key = NULL ; char * path ; int key_index ; HKEY root_keys [ 2 ] = { HKEY_CURRENT_USER , HKEY_LOCAL_MACHINE } ; for ( key_index = 0 ; key_index <= 1 ; key_index ++ ) { if ( RegOpenKeyEx ( root_keys [ key_index ] , JRE_KEY , 0 , KEY_READ , & key ) == ERROR_SUCCESS ) if ( ( path = ProcessDir ( info , key ) ) != NULL ) { if ( key != NULL ) RegCloseKey ( key ) ; return ( path ) ; } if ( key != NULL ) RegCloseKey ( key ) ; } return NULL ; }
This is the global entry point.
This is the global entry point .