private static Properties readConfigFile() {
    Properties properties = new Properties();

    //Get property file stream from classpath
    InputStream inputStream = Configuration.class.getClassLoader().getResourceAsStream(CONFIG_FILE);

    if (inputStream == null) {
      throw new RuntimeException(CONFIG_FILE + " not found in classpath");
    }

    // load the properties
    try {
      properties.load(new InputStreamReader(inputStream, Charsets.UTF_8));
      inputStream.close();
    } catch (FileNotFoundException fnf) {
      LOG.info("No configuration file " + CONFIG_FILE + " found in classpath.", fnf);
    } catch (IOException ie) {
      throw new IllegalArgumentException("Can't read configuration file " +
        CONFIG_FILE, ie);
    }

    return properties;
  }
Find, read, and parse the configuration file.
@return the properties that were found or empty if no file was found
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java