2019.7.28 if(!GetStringFromRegistry(subkey, "JavaHome", buf, bufsize)){ fprintf(stderr, "Failed reading value of registry key:\n\t%s\\%s\\JavaHome\n", JRE_KEY, version); RegCloseKey(key); RegCloseKey(subkey); exit(1); }