| Author |
Properties file dynamic value
|
Adam Teg
Ranch Hand
Joined: Jul 10, 2007
Posts: 58
|
|
I have a properties file. I want to add dynamic value. Example 101=Error 'DYNAMIC VALUE' stoping application. How can I do this with in Java? Thanks
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12269
|
|
A properties file is just a bunch of text lines - each containing a name and a value. How the program interprets the value is up to the programmer. Properties files are usually read just once - when the program starts - if you want different behaviour you will have to program it. Bill
|
Java Resources at www.wbrogden.com
|
 |
Stan James
(instanceof Sidekick)
Ranch Hand
Joined: Jan 29, 2003
Posts: 8791
|
|
|
Are you looking to replace the text DYNAMIC VALUE with a message you make up at runtime? Look at the MessageFormat doc. In recent JREs also look at PrintStream and PrintWriter printf() methods.
|
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
|
 |
 |
|
|
subject: Properties file dynamic value
|
|
|