修复无法找到不包含 release 文件的 Java 的问题 (#4180)
This commit is contained in:
@@ -487,12 +487,15 @@ public final class JavaManager {
|
|||||||
try {
|
try {
|
||||||
info = JavaInfo.fromReleaseFile(releaseFile);
|
info = JavaInfo.fromReleaseFile(releaseFile);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
try {
|
LOG.warning("Failed to read release file " + releaseFile, e);
|
||||||
info = JavaInfoUtils.fromExecutable(executable, false);
|
}
|
||||||
} catch (IOException e2) {
|
}
|
||||||
e2.addSuppressed(e);
|
|
||||||
LOG.warning("Failed to lookup Java executable at " + executable, e2);
|
if (info == null) {
|
||||||
}
|
try {
|
||||||
|
info = JavaInfoUtils.fromExecutable(executable, false);
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOG.warning("Failed to lookup Java executable at " + executable, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user