Anyone please help me on reloading properties file. I have code like this
Properties prop = new Properties();
InputStream trackerFileStream =
LoadProper
If you want to be updated you need to check the resource from tome to time and reload the properties.
It is a problem that you are loading properties from classpath. If you use file system you can check the last modified attribute of file and decide whether to reload it. In java 7 you evern can register listener that will call you back when file is modified. You can't do this when loading resource.
But you can do better. Use configuration package from apache. It already implements reloading logic, so you just can work against "configuration" actually mapped to resource and be sure you always get updated data.
Do you close/flush your streams correctly? Why using classloader to access the file? If the file is an external file you should access it via normal FileInputStream
for example