Java tutorial
//package com.java2s; import java.util.ResourceBundle; public class Main { private static final String CONF_PATH = "conf.system"; private static ResourceBundle resourceBundle; public static String getConfigValue(String key) { return getResourceBundle().getString(key); } public static ResourceBundle getResourceBundle() { if (resourceBundle == null) { resourceBundle = ResourceBundle.getBundle(CONF_PATH); } return resourceBundle; } }