java - Access properties from source folder for exporting to runnable jar -
i need access properties file jar when export runnable jar.so when put props file in project root folder in eclipse running.but when exported not copied.so wanted placed within source folder. how access source folder.
java.io.filenotfoundexception: config.properties (the system cannot find fil e specified) @ java.io.fileinputstream.open(native method) @ java.io.fileinputstream.(fileinputstream.java:106) @ java.io.fileinputstream.(fileinputstream.java:66) @ com.my.ashwinsakthi.twitterclient.iplhashtagreader.main(iplhashtagreader.jav a:38)
1,is properties file packed in jar file?
2,use myclass.class.getresourceasstream("/config.properties") instead.
new file(filename) searching filename in user.dir
Comments
Post a Comment