GHawk

          加載Classpath中的文件(轉(zhuǎn))

             URL url = this.getClass().getResource("EJBConfig.xml");
                  
          try {
                      File xmlFile 
          = new File(URLDecoder.decode(url.getFile(),"UTF-8"));
                      
          if(xmlFile.exists())
                          System.out.println(
          "OK");
                  } 
          catch (UnsupportedEncodingException e) {
                      e.printStackTrace();  
          //To change body of catch statement use File | Settings | File Templates.
                  }

          posted on 2006-01-19 22:07 GHawk 閱讀(775) 評論(0)  編輯  收藏 所屬分類: 代碼碎片


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導航:
           
          主站蜘蛛池模板: 沙田区| 东阳市| 平定县| 阿瓦提县| 抚松县| 绥化市| 青神县| 水城县| 应用必备| 绥棱县| 获嘉县| 绥化市| 武安市| 临夏县| 海晏县| 原平市| 保德县| 福泉市| 沅陵县| 芜湖县| 靖江市| 女性| 重庆市| 应城市| 苏尼特右旗| 巨野县| 长岭县| 云浮市| 巴林左旗| 贺州市| 大丰市| 白朗县| 泰来县| 云浮市| 湟中县| 同德县| 柞水县| 商南县| 刚察县| 海晏县| 威信县|