I can't write the Properties
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jeffrey_rui
Posted On:   Wednesday, July 31, 2002 11:00 PM

I can read the properties using these code:



InputStream is = getClass().getResourceAsStream("config.properties");

Properties cfgProps = new Properties();

try

{

cfgProps.load(is);

}

catch (Exception e)

{

}

But how can i write the value into properties file,if any examples is better.

Re: I can't write the Properties

Posted By:   Jorgen_Nordqvist  
Posted On:   Saturday, August 3, 2002 05:17 PM

Use the void store(OutputStream out, String header) method of Properties to save your properties into the file.

Jorgen

About | Sitemap | Contact