?
1.用ResourceBundle
ResourceBundle rb = ResourceBundle.getBundle("jdbc"); //没有.properties结尾
String driver = rb.getString("jdbc.driverClassName");
?
2.用Properties
Properties env = new Properties();
InputStream is = ClassLoader.getSystemResourceAsStream("env.properties");
env.load(is);
env.getProperty("jdbc.driverClassName")
?
JAVA操作properties文件
http://www.cnblogs.com/panjun-Donet/archive/2009/07/17/1525597.html
Java读取Properties文件的六种方法
http://hi.baidu.com/hgd0324/item/1d5e923973b77c4d033edcaf
?