使用Eclipase开发一个包,
现在结构有
com.ut.service
com.ut.resource
com.ut.resource下有文件 config.properties,,,
我在com.ut.service代码中读取 config.properties文件
应该如何操作
现在方法:
String filePath = "bin/com/ut/resources/config.properties";
File file = new File(filePath);
能找到文件
但是把项目导成JAR包之后就报错 :bin/com/ut/resources/config.properties (No such file or directory)
应该如何解决这个问题,各位大大请帮忙呀
相关分类