Java - How to find that the user has changed the configuration file?
Posted
by Yatendra Goel
on Stack Overflow
See other posts from Stack Overflow
or by Yatendra Goel
Published on 2010-03-11T17:04:25Z
Indexed on
2010/03/11
17:19 UTC
Read the original article
Hit count: 241
I am developing a Java Desktop Application
. This app needs a configuration
to be started. For this, I want to supply a defaultConfig.properties
or defaultConfig.xml
file with the application so that If user doesn't select any configuration, then the application will start with the help of defaultConfig
file.
But I am afraid of my application crash if the user accidentally edit the defaultConfig
file. So Is there any mechanism through which I can check before the start of the application that whether the config
file has changed or not.
How other applications (out in the market) deal with this type of situation in which their application depends on a configuration file?
If the user edited the config file accidentally or intentionally, then the application won't run in future unless he re-installs the application.
© Stack Overflow or respective owner