摘要: 1.一定要用完整的路径,但不是硬编码,而是运算出来的2.//FileInputStream is=new FileInputStream("conf.properties"); ReflectTest.class.getClassLoader.getResourceAsStream("classPath+conf.propertise"); 3.相对目录与绝对目录4.@我们把config.properties文件和TestReflect.java放在同一目录下时: InputStream is = TestReflect.class.getClassLo 阅读全文
posted @ 2013-04-07 23:20 半世晨晓 阅读(97) 评论(0) 推荐(0)