This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to create a properties files through java program and store it on local system

 
Manohar Saddala
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

i need to create a properties file from my java program and store it on my local disk. if any one can send the sample code it would be help full.

Regards,
manu
[ November 19, 2007: Message edited by: manu ]
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello manu-

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

As to your question, what have you tried? Properties files are pretty easy to create; it could be as simple as:
 
Anil Kumar Saha
Ranch Hand
Posts: 111
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create a Temporary file using the below code


just change the .suffix by .properties and write the key-value pair according to your requirement.For example
out.write("aKey="+value);

For more info click here
javaalmanac
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic