aspose file tools*
The moose likes I/O and Streams and the fly likes how to create a properties files through java program and store it on local system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "how to create a properties files through java program and store it on local system" Watch "how to create a properties files through java program and store it on local system" New topic
Author

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

Manohar Saddala
Greenhorn

Joined: Jul 11, 2007
Posts: 12
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 ]

manu
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41461
    
  51
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:


Ping & DNS - my free Android networking tools app
Anil Kumar Saha
Ranch Hand

Joined: Apr 07, 2004
Posts: 111
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


Regards,

Anil Kumar Saha
SCJP 1.4
http://www.agilej.blogspot.com/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to create a properties files through java program and store it on local system