摘要: 1. console模式下: String fileDir = Thread.currentThread().getContextClassLoader().getResource("./").getPath(); 或者 = PropertiesFacoty.class.getClassLoader().getResource("./").getPath(); 或 URL fileDir = PropertiesFacoty.class.getResource("."); 在web容器中直接获取到系统的lib目录而不是项目的。2. w 阅读全文
posted @ 2011-11-07 22:35 小网虫 阅读(717) 评论(0) 推荐(0) 编辑