docs: public static FormValidation validateExecutable(String exe, FileValidator exeValidator) {
          // insufficient permission to perform validation?
          if(!Jenkins.getInstance().hasPermission(Jenkins.ADMINISTER)) return ok();
  
          exe = fixEmpty(exe);
          if(exe==null)
              return ok();
  
          if(exe.indexOf(File.separatorChar)>=0) {
              // this is full path
              File f = new File(exe);
              if(f.exists())  return exeValidator.validate(f);
  
              File fexe = new File(exe+".exe");
              if(fexe.exists())   return exeValidator.validate(fexe);
  
              return error("There's no such file: "+exe);
          }
  
          // look in PATH
          String path = EnvVars.masterEnvVars.get("PATH");
          String tokenizedPath = "";
          String delimiter = null;
          if(path!=null) {
              for (String _dir : Util.tokenize(path.replace("\\", "\\\\"),File.pathSeparator)) {
                  if (delimiter == null) {
                    delimiter = ", ";
                  }
                  else {
                    tokenizedPath += delimiter;
                  }
  
                  tokenizedPath += _dir.replace('\\', '/');
  
                  File dir = new File(_dir);
  
                  File f = new File(dir,exe);
                  if(f.exists())  return exeValidator.validate(f);
  
                  File fexe = new File(dir,exe+".exe");
                  if(fexe.exists())   return exeValidator.validate(fexe);
              }
  
              tokenizedPath += ".";
          } else {
              tokenizedPath = "unavailable.";
          }
  
          // didn't find it
          return error("There's no such executable "+exe+" in PATH: "+tokenizedPath);
      }