Java读取资源文件

2014-11-24 02:45:49 · 作者: · 浏览: 2

Properties props = new Properties();

props.load(new FileInputStream("db.properties")); //相对src的路径

String s = props.getProperty(key);



========================================================


=======================================================================