I have an application in Java. Each time a new database is added we have to make changes in java file which reads from properties file and compile it
I want to make a property file and each time a new database is added just change in that file and application will run without recompiling it.
How is it possible, give me an example with sample code please

creating and maintaining a .properties file can be done in notepad. if it's a web application, you'll still need to re-create the .ear/.war / .. file and deploy it to your webserver