Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions HMCL/java.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,15 @@ void HLSearchJavaInPath(HLJavaList &result, const std::wstring &path, LPCWSTR ja
if (pathCount > 0) { // Not empty
HLPath javaExecutable = path.substr(pos, pathCount);
javaExecutable /= javaExecutableName;
HLDebugLogVerbose(L"Checking " + javaExecutable.path);
result.TryAdd(javaExecutable);
}

// https://github.com/HMCL-dev/HMCL/issues/4079
if (javaExecutable.path.find(L"\\Common Files\\Oracle\\Java\\") == std::wstring::npos) {
HLDebugLogVerbose(L"Checking " + javaExecutable.path);
result.TryAdd(javaExecutable);
} else {
HLDebugLogVerbose(std::format(L"Ignore Oracle Java {}", javaExecutable.path));
}
}
pos = end + 1;
}
}
Expand Down