protected String getExecutable(String executable) {
    String[] searchPaths = getExecutableSearchPaths();
    String executablePath = null;

    if (searchPaths == null) {
      searchPaths = DEFAULT_EXECUTABLE_SEARCH_PATHS;
    }

    for (String searchPath : searchPaths) {
      File executableFile = new File(searchPath, executable);

      if (executableFile.canExecute()) {
        executablePath = executableFile.getAbsolutePath();
        break;
      }
    }

    return (executablePath == null) ? executable : executablePath;
  }
Given the name of an executable, searches the configured executable search path for an executable
file with that name.

@param executable a String declaring the name of the executable to find within the search path
@return the absolute path of the found execute or the name of the executable if not found
within the search path
@see #setExecutableSearchPaths(String)
@see #setExecutableSearchPaths(String[])
ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosOperationHandler.java