File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Property files in java

 
Uma Reddy
Greenhorn
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does java know to load the correct property file. We have development, integration and acceptance environments. How does java pick the right property file corresponding to each environment. I will appreciate if someone can explain clearly how java does it. Thank You, Uma
 
Satya Sakhinetipalli
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Define an environment variable some value (tier name can be the value) and respective properties file is loaded for that tier. ex :

-DCONFIG_MODE=dev in development and properties file related to dev is loaded.

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java has no default mechanism for doing this. As Satya implies, there must be some way of defining which file to load. There are, however, a whole bunch of ways this could be implemented.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic