Add more Java installation dirs

Signed-off-by: nea <nea@nea.moe>
This commit is contained in:
nea 2023-10-04 21:20:59 +02:00
parent 024c474658
commit c6c17036e3
No known key found for this signature in database
GPG Key ID: AA563E93EB628D91

View File

@ -403,6 +403,14 @@ QList<QString> JavaUtils::FindJavaPaths()
scanJavaDirs("/opt/jdks");
// flatpak
scanJavaDirs("/app/jdk");
auto home = qEnvironmentVariable("HOME");
// javas downloaded by IntelliJ
scanJavaDirs(FS::PathCombine(home, ".jdks"));
// javas downloaded by sdkman
scanJavaDirs(FS::PathCombine(home, ".sdkman/candidates/java"));
javas = addJavasFromEnv(javas);
javas.removeDuplicates();
return javas;