Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion HMCL/java.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ void HLSearchJavaInPath(HLJavaList &result, const std::wstring &path, LPCWSTR ja
javaExecutable /= javaExecutableName;

// https://github.com/HMCL-dev/HMCL/issues/4079
if (javaExecutable.path.find(L"\\Common Files\\Oracle\\Java\\") == std::wstring::npos) {
if ( (javaExecutable.path.find(L"\\Common Files\\Oracle\\Java\\") == std::wstring::npos) ||
(javaExecutable.path.find(L"\\COMMON FILES\\ORACLE\\JAVA\\") == std::wstring::npos) ) {
HLDebugLogVerbose(L"Checking " + javaExecutable.path);
result.TryAdd(javaExecutable);
} else {
Expand Down
15 changes: 0 additions & 15 deletions HMCL/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,6 @@ int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmd
}
}

{
const auto appDataPath = HLGetEnvPath(L"APPDATA");
if (appDataPath.has_value() && !appDataPath.value().path.empty()) {
HLPath hmclJavaDir = appDataPath.value() / L".hmcl\\java";
if (isARM64) {
hmclJavaDir /= L"windows-arm64";
} else if (isX64) {
hmclJavaDir /= L"windows-x86_64";
} else {
hmclJavaDir /= L"windows-x86";
}
HLSearchJavaInDir(javaRuntimes, hmclJavaDir, javaExecutableName);
}
}

// Search Java in PATH
{
const auto paths = HLGetEnvVar(L"PATH");
Expand Down