Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

writting to property file

 
Anna Hays
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, can someone tell me how to set and write to a property file after loaded and changed it? I am using ResourceBundle. I have looked at System.setProperty etc, but nothing seem to provide the functionalities to set and write back to the property file. Apart from loading it as a File and put KEY=VALUE.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would check out the Properties class' API doc at http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html
You'll see that the class has got a store() method that accepts an output stream.
Regards,
Marcel
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!