java操作配置文件.properties

时间:2014-12-17 16:12:03   收藏:0   阅读:152

     一会asp.net,一会java的.....

 

Properties reqProperties = new Properties();
String path = System.getProperty("user.dir");
InputStream in = new FileInputStream(path+File.separator+"message.properties");
reqProperties.load(in);
String attrType = reqProperties.getProperty("attrType");  //获取配置文件中属性名attrType的值
in.close();

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!