Load the backing from the properties file visible to our classloader, plus the filesystem.
559428
@SuppressWarnings("checkstyle:emptyblock")
	private void load() {
		recordMessage("Loading parameters");
		File cwd = new File(".");
		String workingDir;

		try {
			workingDir = cwd.getCanonicalPath();
		} catch (IOException ex) {
			workingDir = "UNKNOWN";
		}

		recordMessage("Working directory is " + workingDir);

		for (String resourceName : PARAMETER_LOAD_ORDER) {
			loadTop(resourceName);
		}

		if (getBoolean(USE_SYSTEM_PROPERTIES)) {
			recordMessage("Loading from system properties");
			load(System.getProperties(), "System Properties", true);
		}

		// Now perform variable substitution.
		do {
			// Do nothing while loop
		} while (substitute());

		if (getBoolean(DUMP)) {
			// Can't use logging infrastructure here, so dump to console
			log(getDebuggingInfo());
			log(getMessages());
		}

		// We don't want the StringBuffer hanging around after 'DUMP'.
		clearMessages();

		// Now move any parameters with the system parameters prefix into the real system parameters.
		Properties systemProperties = getSubProperties(SYSTEM_PARAMETERS_PREFIX, true);
		System.getProperties().putAll(systemProperties);
	}
1050072
public void load() {
        try {
            setPersistFile();
            XMLObjectReader reader = XMLObjectReader.newInstance(new FileInputStream(persistFile.toString()));
            reader.setBinding(binding);
            load(reader);
        } catch (XMLStreamException | FileNotFoundException e) {
            System.err.println(String.format("Error while load the MAP Resource state from file=%s", persistFile.toString()));
            e.printStackTrace();
        }
    }
972645
function loadIncludeProperties() {
  var libPath = this.fullPath('/include');
  if (fs.existsSync(libPath) && fs.statSync(libPath).isDirectory()) {
    var files = protos.util.ls(libPath, this.regex.jsFile);
    files.forEach(function(file) {
      var key = inflect.camelize(file.replace(this.regex.jsFile, ''), true);
      var data = protos.require(libPath + "/" + file, true); // Don't use module cache (allow reloading)
      if (this[key] && typeof this[key] == 'object') {
         _.extend(this[key], data);
      } else {
        this[key] = data;
      }
    }, this);
  }
  this.emit('includes_loaded');
}
481867
public static Properties loadProperties(File f) throws IOException {
        Properties props = new Properties();
        FileInputStream in = new FileInputStream(f);
        try {
            props.load(in);
            return props;
        } finally {
            try {
                in.close();
            } catch (IOException e) {
            }
        }
    }
79089
public static Properties loadProperties(File file) throws IOException {
        FileInputStream finp = new FileInputStream(file);
        try {
            Properties p = new Properties();
            p.load(finp);
            return p;
        } finally {
            ArchiveUtils.closeQuietly(finp);
        }
    }
614578
private Config loadJavaPropsWithFallback(Path propertiesPath, Config fallback) throws IOException {

    PropertiesConfiguration propertiesConfiguration = new PropertiesConfiguration();
    try (InputStreamReader inputStreamReader = new InputStreamReader(this.fs.open(propertiesPath),
        Charsets.UTF_8)) {
      propertiesConfiguration.setDelimiterParsingDisabled(ConfigUtils.getBoolean(fallback,
    		  PROPERTY_DELIMITER_PARSING_ENABLED_KEY, DEFAULT_PROPERTY_DELIMITER_PARSING_ENABLED_KEY));
      propertiesConfiguration.load(inputStreamReader);

      Config configFromProps =
          ConfigUtils.propertiesToConfig(ConfigurationConverter.getProperties(propertiesConfiguration));

      return ConfigFactory.parseMap(ImmutableMap.of(ConfigurationKeys.JOB_CONFIG_FILE_PATH_KEY,
          PathUtils.getPathWithoutSchemeAndAuthority(propertiesPath).toString()))
          .withFallback(configFromProps)
          .withFallback(fallback);
    } catch (ConfigurationException ce) {
      throw new IOException(ce);
    }
  }
1107521
private void loadPropFile(String propFileName) throws IOException, Error {

		InputStream inputStream = null;
		try {
			inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);
			if (inputStream != null) {
				this.prop.load(inputStream);
				LOGGER.debug("properties file " + propFileName + " loaded succesfully");
			} else {
				String errorMsg = "properties file '" + propFileName + "' not found in the classpath";
				LOGGER.error(errorMsg);
				throw new Error(errorMsg, Error.SETTINGS_FILE_NOT_FOUND);
			}
		} finally {
			try {
				if (inputStream != null) {
					inputStream.close();
				}
			} catch (IOException e) {
				LOGGER.warn("properties file '"  + propFileName +  "' not closed properly.");
			}
		}
	}
160703
private void loadFromClasspath() {
        URL url = null;
        try {
            // this is the new location of the file, working on Java 8, Java 9 class path and Java 9 module path
            ClassLoader loader = Thread.currentThread().getContextClassLoader();
            if (loader == null) {
                loader = RenameHandler.class.getClassLoader();
            }
            if (LOG) {
                System.err.println("Loading from classpath: " + loader);
            }
            Enumeration<URL> en = loader.getResources("META-INF/org/joda/convert/Renamed.ini");
            while (en.hasMoreElements()) {
                url = en.nextElement();
                if (LOG) {
                    System.err.println("Loading file: " + url);
                }
                List<String> lines = loadRenameFile(url);
                parseRenameFile(lines, url);
            }
        } catch (Exception ex) {
            if (LOG) {
                ex.printStackTrace(System.err);
            }
            throw new IllegalStateException("Unable to load Renamed.ini: " + url + ": " + ex.getMessage(), ex);
        }
    }
979483
private function loadProperties()
    {
        try {
            $properties = new Properties();
            $properties->load($this->file);
        } catch (IOException $ioe) {
            throw new BuildException($ioe);
        }
        return $properties;
    }
980613
public void load(String filename, String separator) throws IOException, PropertiesException {
		load(new File(filename), separator);
	}
48886
protected void load()
    {
        properties = new Properties();

        String filename = getFilename();
        
        try
        {
            URL url = ClassHelper.getResource(filename);

            if (url == null)
            {
                url = (new File(filename)).toURL();
            }

            logger.info("Loading OJB's properties: " + url);

            URLConnection conn = url.openConnection();
            conn.setUseCaches(false);
            conn.connect();
            InputStream strIn = conn.getInputStream();
            properties.load(strIn);
            strIn.close();
        }
        catch (FileNotFoundException ex)
        {
            // [tomdz] If the filename is explicitly reset (null or empty string) then we'll
            //         output an info message because the user did this on purpose
            //         Otherwise, we'll output a warning
            if ((filename == null) || (filename.length() == 0))
            {
                logger.info("Starting OJB without a properties file. OJB is using default settings instead.");
            }
            else
            {
                logger.warn("Could not load properties file '"+filename+"'. Using default settings!", ex);
            }
            // [tomdz] There seems to be no use of this setting ?
            //properties.put("valid", "false");
        }
        catch (Exception ex)
        {
            throw new MetadataException("An error happend while loading the properties file '"+filename+"'", ex);
        }
    }
925011
public static Properties getPropertiesFromClasspath(String fileName)
      throws PropertiesFileNotFoundException {

    Properties props = new Properties();
    try {
      InputStream is = ClassLoader.getSystemResourceAsStream(fileName);
      if (is == null) { // try this instead
        is = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileName);
        logger.debug("loaded properties file with Thread.currentThread()");
      }
      props.load(is);
    } catch (Exception e) {
      throw new PropertiesFileNotFoundException(
          "ERROR LOADING PROPERTIES FROM CLASSPATH >" + fileName + "< !!!", e);
    }
    return props;
  }
593473
static public Properties loadProperties(Properties base, File file) throws IOException {
	FileReader reader = new FileReader(file);
	Properties props = new Properties();
	props.load(reader);
	if (base != null) props.putAll(base);
	reader.close();
	return props;
    }
1215777
private void loadOverridesFromSystemProperties() {
        PropertyName[] names = PropertyName.values();
        for (PropertyName propertyName: names){
            String sysProp = System.getProperty(propertyName.name);
            if(sysProp != null){
                properties.put(propertyName.name, sysProp);
            }
        }
    }
1222221
private Properties loadProperties(InputStream inputStream) throws IOException {
        Properties properties = new Properties();
        properties.load(inputStream);
        return properties;
    }
883575
public static synchronized void reload() {
    map = new HashMap<Class<?>, Object>();
    customProperties = loadFile(CUSTOM_TUNING_FILE_NAME);
    defaultProperties = loadFile(DEFAULT_TUNING_FILE_NAME);
  }
55005
private static Properties loadProperties(String defaultsName, String propertiesName) throws IOException {
        Properties bundle = new Properties();
        ClassLoader loader = SecurityActions.getContextClassLoader();
        URL defaultUrl = null;
        URL url = null;
        // First check for local visibility via a URLClassLoader.findResource
        if (loader instanceof URLClassLoader) {
            URLClassLoader ucl = (URLClassLoader) loader;
            defaultUrl = SecurityActions.findResource(ucl, defaultsName);
            url = SecurityActions.findResource(ucl, propertiesName);
            PicketBoxLogger.LOGGER.traceAttemptToLoadResource(propertiesName);
        }
        // Do a general resource search
        if (defaultUrl == null) {
            defaultUrl = loader.getResource(defaultsName);
            if (defaultUrl == null) {
                try {
                    defaultUrl = new URL(defaultsName);
                } catch (MalformedURLException mue) {
                    PicketBoxLogger.LOGGER.debugFailureToOpenPropertiesFromURL(mue);
                    File tmp = new File(defaultsName);
                    if (tmp.exists()) {
                        defaultUrl = tmp.toURI().toURL();
                    }
                }
            }
        }
        if (url == null) {
            url = loader.getResource(propertiesName);
            if (url == null) {
                try {
                    url = new URL(propertiesName);
                } catch (MalformedURLException mue) {
                    PicketBoxLogger.LOGGER.debugFailureToOpenPropertiesFromURL(mue);
                    File tmp = new File(propertiesName);
                    if (tmp.exists()) {
                        url = tmp.toURI().toURL();
                    }
                }
            }
        }
        if (url == null && defaultUrl == null) {

            String propertiesFiles = propertiesName + "/" + defaultsName;
            throw PicketBoxMessages.MESSAGES.unableToFindPropertiesFile(propertiesFiles);
        }

        if (url != null) {
            InputStream is = null;
            try {
                is = SecurityActions.openStream(url);
            } catch (PrivilegedActionException e) {
                throw new IOException(e.getLocalizedMessage());
            }
            if (is != null) {
                try {
                    bundle.load(is);
                } finally {
                    safeClose(is);
                }
            } else {
                throw PicketBoxMessages.MESSAGES.unableToLoadPropertiesFile(propertiesName);
            }
            PicketBoxLogger.LOGGER.tracePropertiesFileLoaded(propertiesName, bundle.keySet());
        } else {
            InputStream is = null;
            try {
                is = defaultUrl.openStream();
                bundle.load(is);
                PicketBoxLogger.LOGGER.tracePropertiesFileLoaded(defaultsName, bundle.keySet());
            } catch (Throwable e) {
                PicketBoxLogger.LOGGER.debugFailureToLoadPropertiesFile(defaultsName, e);
            } finally {
                safeClose(is);
            }
        }
        return bundle;
    }