-
properties.setProperty() method problem
Hi,
I have a property file on my system and I am able to load that into a properties
object and also able to read the values using properties.getProperty() method..but
for the same properties of the file using properties.setProperty() to write
new values into the file and it doesn't work..the program complies well and
runs also without any errors, but it is not writing into the file....my friend
says I have to physically write inot the file using FileOutputStreams..and
then use the
properties.setProperty() method to write the new values....
pls let me know how do I do it.....if u know the ans...
Satish
-
Re: properties.setProperty() method problem
Your friend is half right, you have to use setProperty() to set the new
value and THEN use store() to write to the file.
PC2
"satish" <satish_141@yahoo.com> wrote in message
news:3bd8195b$1@news.devx.com...
>
> Hi,
>
> I have a property file on my system and I am able to load that into a
properties
> object and also able to read the values using properties.getProperty()
method..but
> for the same properties of the file using properties.setProperty() to
write
> new values into the file and it doesn't work..the program complies well
and
> runs also without any errors, but it is not writing into the file....my
friend
> says I have to physically write inot the file using FileOutputStreams..and
> then use the
> properties.setProperty() method to write the new values....
>
> pls let me know how do I do it.....if u know the ans...
>
> Satish
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks