--1--------------------------------------
ResourceBundle resource = ResourceBundle.getBundle("net/rubyeye/test/config");
得 到net/rubyeye/test/下面的config.properties
value=resource.getString("url") ; //得到配置文件的url属性
得 到net/rubyeye/test/下面的config.properties
value=resource.getString("url") ; //得到配置文件的url属性
--2--------------------------------
private Properties props = new Properties();
InputStream infile = this.getClass().getResourceAsStream("/SystemConfig.properties");
props.load(infile);
String url=props.getProperty("url");
String username=props.getProperty("username");
String username=props.getProperty("password");
InputStream infile = this.getClass().getResourceAsStream("/SystemConfig.properties");
props.load(infile);
String url=props.getProperty("url");
String username=props.getProperty("username");
String username=props.getProperty("password");
==
http://blog.csdn.net/baobeiSimple/archive/2007/08/24/1757922.aspx