What is the best option for reading Java property files?

Posted by Mr Morgan on Stack Overflow See other posts from Stack Overflow or by Mr Morgan
Published on 2010-06-06T15:16:04Z Indexed on 2010/06/06 15:22 UTC
Read the original article Hit count: 420

Filed under:
|
|
|

Hello

I have an application which uses a servlet to read an intialization parameter from web.xml for the location of a property file. The serlvet then creates an instance of a class which stores the location of the file for other programs to read as required. This class has appropriate get and set methods.

But my question concerns access to the properties: should the physical property file be read by each program as at runtime or should the properties be stored in memory instead?

The properties are not currently altered at runtime but this could change? I've seen various alternative approaches but am not sure which is best.

Thanks

Mr Morgan

© Stack Overflow or respective owner

Related posts about java

Related posts about file