aspose file tools
The moose likes Java in General and the fly likes arguments to a properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "arguments to a properties file" Watch "arguments to a properties file" New topic
Author

arguments to a properties file

vinitha simon
Ranch Hand

Joined: Dec 13, 2007
Posts: 64
I have a mail.properties file, to which I should pass the name as an argument... the properties file looks similar to this

message = hi ${0} , This is a test mail.

the name is dynamic and is passed when the properties file is loaded.

I'm loading it using ResourceBundle. I'm unsure how to pass the name as the argument and how to get it to reflect in the properties file....

Any help is appreciated!

TIA,
Steve Luke
Bartender

Joined: Jan 28, 2003
Posts: 3041
    
    4

Once you read the property in from the bundle, you pass it to a MessageFormat to insert the parameters:
See: MessageFormat API
Example:


Steve
Pratap koritala
Ranch Hand

Joined: Sep 27, 2006
Posts: 251
Already answered Here
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: arguments to a properties file
 
Similar Threads
Hardcoding a properties file
specifying paths to create file
How to use Properties file contents
command line arguments...
How to hide/disable Hibernate log to console