in src/main/cpp/bootstrap/jvmlauncher.cpp [54:88]
bool JvmLauncher::checkJava(const char *path, const char *prefix) {
assert(path);
assert(prefix);
logMsg("checkJava(%s)", path);
javaPath = path;
if (*javaPath.rbegin() == '\\') {
javaPath.erase(javaPath.length() - 1, 1);
}
javaExePath = javaPath + prefix + JAVA_EXE_FILE;
javawExePath = javaPath + prefix + JAVAW_EXE_FILE;
javaClientDllPath = javaPath + prefix + JAVA_CLIENT_DLL_FILE;
javaServerDllPath = javaPath + prefix + JAVA_SERVER_DLL_FILE;
if (!fileExists(javaClientDllPath.c_str())) {
javaClientDllPath = "";
}
if (!fileExists(javaServerDllPath.c_str())) {
javaServerDllPath = "";
}
javaBinPath = javaPath + prefix + JAVA_BIN_DIR;
if (fileExists(javaExePath.c_str()) || !javaClientDllPath.empty() || !javaServerDllPath.empty()) {
if (!fileExists(javawExePath.c_str())) {
logMsg("javaw.exe not exists, forcing java.exe");
javawExePath = javaExePath;
}
return true;
}
javaPath.clear();
javaBinPath.clear();
javaExePath.clear();
javawExePath.clear();
javaClientDllPath.clear();
javaServerDllPath.clear();
return false;
}