mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
JavaDetector: a comment related to IDEA-253051
GitOrigin-RevId: fc3cc8109fb2a81863575313e347633b4a1ff743
This commit is contained in:
committed by
intellij-monorepo-bot
parent
89e3accbb9
commit
de9b33b3f3
+6
-1
@@ -238,7 +238,11 @@ public class JavaHomeFinderBasic {
|
||||
var home = innerDir;
|
||||
var releaseFile = home.resolve("release");
|
||||
if (!exists(releaseFile)) continue;
|
||||
if (mac && Files.isSymbolicLink(releaseFile) && home.getFileName().toString().contains("zulu")) {
|
||||
|
||||
// Zulu JDK on MacOS has a rogue layout, with which Gradle failed to operate (see the bugreport IDEA-253051),
|
||||
// and in order to get Gradle working with Zulu JDK we should use it's second home (when symbolic links are resolved),
|
||||
boolean zuluOnMac = mac && Files.isSymbolicLink(releaseFile) && home.getFileName().toString().contains("zulu");
|
||||
if (zuluOnMac) {
|
||||
try {
|
||||
var realReleaseFile = releaseFile.toRealPath();
|
||||
if (!exists(realReleaseFile)) { log.warn("Failed to resolve the target file (it doesn't exist) for: " + releaseFile.toString()); continue; }
|
||||
@@ -250,6 +254,7 @@ public class JavaHomeFinderBasic {
|
||||
log.warn("Failed to resolve the target file (exception) for: " + releaseFile.toString() + ": " + ioe.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
result.add(home.toString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user