How to use java property files?

Posted by Click Upvote on Stack Overflow See other posts from Stack Overflow or by Click Upvote
Published on 2009-08-23T11:31:48Z Indexed on 2010/03/22 14:51 UTC
Read the original article Hit count: 233

Filed under:
|

So I have a list of key/value pairs of configuration values I want to store as java property files, and later load and iterate through.

Questions:

  • Do I need to store the file in the same package as the class which will load them, or is there any specific location where it should be placed?

  • Does the file need to end in any specific extension or is .txt ok?

  • How can I load the file in the code

  • And how can I iterate through the values inside?

© Stack Overflow or respective owner

Related posts about java

Related posts about java-properties