**DONOTDELETE**
(Unregistered)
04/08/06 08:29 AM
Multi-user, multi-properties

I prefer to read properties from a source defined outside the program:

java -DMY_APP_CONFIG=~/.myapprc

This way different users can have different config-files.
Even one user may have different ones.

This way the user may put his configurationfile to a place which is part of a backup.
And don't has to unjar the jar, which is discussed above.

Another search-strategie which is well established looks like this:
- is there an explicit configuration-file given? (-DMY_APP_CONFIG=~/.myapp-tiny-rc)
- if not, is a configuration-file found at the users default-place (linux: ~/.myapprc)
- if not, is a system-wide config file available (/etc/myapprc)
- if not, use build-in defaults.

This way, configuration is simple, but fine granulated control solutions are possible.



Contact us JavaWorld

Powered by UBB.threads™ 6.5.5

Featured White Papers


RESEARCH CENTERS: Java Standard Edition | Java Enterprise Edition | Java Micro Edition | Development Tools
About Us | Advertise | Contact Us | Terms of Service/Privacy
Copyright, 2006-2008 Network World, Inc. All rights reserved.