properties.setProperty() method problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: properties.setProperty() method problem

  1. #1
    satish Guest

    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


  2. #2
    Paul Clapham Guest

    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
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center