• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to update only one key=value pair in a .properties file with Java?

 
Toni Howlett
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm making a site where each user has their own property page instead of 10 billion cookies (hehe) and I've gotten it where there are default key=value pairs, but when I try to update one, I get it to change but make all the others disappear.

I have tried to google it and find out, but a lot of answers I find are just to open the file and edit them myself. I need these values to auto update when the user selects an option for something.

(wasn't sure if this was suppose to go in JSP section or this...)

Thanks for the help
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
load();
setProperty();
store();
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
Toni Howlett
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic