Return to Snippet

Revision: 55376
at February 4, 2012 03:46 by spupy

Initial Code
private static Properties	properties;

private static String getProp(String propKey) {
	if (properties == null) {
		properties = new Properties();
		try {
			properties.load(new FileInputStream("myprops.config"));
		} catch (IOException e) {
	return properties.getProperty(propKey);

Initial URL

Initial Description
Loads Properties from a file and retrieves a single String property.

Initial Title
Get String from file-backed Properties

Initial Tags

Initial Language