mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 04:22:16 +00:00
[JENKINS-25601] Noting merge of #1499.
This commit is contained in:
commit
b33b921dc5
2 files changed
+8
-1
No files matched your search
@@ -182,7 +182,11 @@ public final class JDK extends ToolInstallation implements NodeSpecific<JDK>, En
|
||||
@Override protected FormValidation checkHomeDirectory(File value) {
|
||||
File toolsJar = new File(value,"lib/tools.jar");
|
||||
File mac = new File(value,"lib/dt.jar");
|
||||
if(!toolsJar.exists() && !mac.exists())
|
||||
|
||||
// JENKINS-25601: JDK 9+ no longer has tools.jar. Keep the existing dt.jar/tools.jar checks to be safe.
|
||||
File javac = new File(value, "bin/javac");
|
||||
File javacExe = new File(value, "bin/javac.exe");
|
||||
if(!toolsJar.exists() && !mac.exists() && !javac.exists() && !javacExe.exists())
|
||||
return FormValidation.error(Messages.Hudson_NotJDKDir(value));
|
||||
|
||||
return FormValidation.ok();
|
||||
|
||||
Reference in new issue
Block a user