如何读取JAR包外的properties文件及打成jar包后无法读取到jar包内的properties文件
打成jar包后无法读取到jar包内的properties文件
发现在eclipse里一切正常,但打成jar包后就无法读取到properties文件了。
之前的程序是这样获取配置文件的:
String filePath = System.getProperty("user.dir") + "/conf/configfilename.properties"; InputStream in = new BufferedInputStream(new FileInputStream(filePath)); 原地址:http://hi.baidu.com/qu3999352/item/04361a620a28fb2b69105b92