This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to change property file values using ResoureBundle

 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am reading one Property file ( applicationresource.proprties ) by using ResoureBundle.



here i have to set value of any one of key,
is that possible?
is that applicable through out application?
if not could you please advice any other solutions?

I really appriciate you if you have any solutions.

Really Thanks.

 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one please help me.
 
salvin francis
Bartender
Posts: 1263
10
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would advise against editing properties files since these are usually text files that save the configuration of the systems.

basically properties files are plain simple text files,

here is how to edit a text file:
http://home.cogeco.ca/~ve3ll/jatutor9.htm
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15207
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class ResourceBundle doesn't have methods to change the values or save its content to a file. But you can read *.properties files with class java.util.Properties instead of class ResourceBundle; class Properties does have methods to change the content and save to a file. Look it up in the API documentation.
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for posting, lemme try with Proprties file and get back to you.
Again Thank you alot
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ResourceBundle usually reads resources. These are often located inside JAR files, and cannot be changed. That's why ResourceBundle has no methods for changing it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic