Jar file can not understand properties file!
Hi all,
I export my app to jar file. Normally, it work in eclipse but when I run jar file from cmd it didn't work. It can not locate properties file. Structure of my app as follows:
ProjectName
src
data
I use getClass().getClassLoader().getResource(path) to load properties files.
Tks so much for your helps!
Mr Den
--- Update ---
OK. I got it. I moved properties file into src folder and used TestLoadResource.class.getClassLoader().getResourc eAsStream("app.cfg.properties");