读取properties文件

 public static String getRootPath() {
        InputStream is 
= null;
        String rootPath
=null;
        
try {
            is 
= GetRootPath.class.getResourceAsStream("/eoms/docmanage/doc_root_path.properties");
            Properties pro 
= new Properties();
            pro.load(is);
           rootPath 
= pro.getProperty("root_path");
        }
 catch (FileNotFoundException e) {
            e.printStackTrace();
        }
 catch (IOException e) {
            e.printStackTrace();
        }

        
return rootPath;
    }

posted on 2011-04-12 17:21 Mr.lu 阅读(131) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航:
 
<2025年4月>
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

导航

统计

常用链接

留言簿(2)

随笔档案

文章档案

搜索

最新评论

阅读排行榜

评论排行榜