讀取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年5月>
          27282930123
          45678910
          11121314151617
          18192021222324
          25262728293031
          1234567

          導航

          統計

          常用鏈接

          留言簿(2)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 太仓市| 内丘县| 双牌县| 白河县| 肇东市| 抚州市| 许昌县| 沁阳市| 巴林右旗| 平和县| 徐州市| 满洲里市| 望奎县| 桦甸市| 泽普县| 南乐县| 教育| 合山市| 安泽县| 翁源县| 东丰县| 奉节县| 河曲县| 合江县| 嘉峪关市| 贵溪市| 眉山市| 永宁县| 盘山县| 嘉定区| 湘潭县| 长寿区| 隆尧县| 尚志市| 扬中市| 太和县| 克什克腾旗| 比如县| 大埔县| 英山县| 旌德县|