Java tutorial
import java.util.ListResourceBundle; import java.util.ResourceBundle; class Configuration extends ListResourceBundle { protected Object[][] getContents() { return new Object[][] { { "port", 80 }, { "host", "java2s.com" }, { "protocol", "http" } }; } } public class Main { public static void main(String[] args) { ResourceBundle resource = ResourceBundle.getBundle("your.ConfigFile"); System.out.println(resource.getObject("port")); System.out.println(resource.getString("host")); } }