aspose file tools*
The moose likes Java in General and the fly likes How to update only one key=value pair in a .properties file with Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to update only one key=value pair in a .properties file with Java?" Watch "How to update only one key=value pair in a .properties file with Java?" New topic
Author

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

Toni Howlett
Ranch Hand

Joined: Jan 18, 2012
Posts: 35
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

Joined: Jan 03, 2004
Posts: 6109
    
    6

load();
setProperty();
store();
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38888
    
  23
And welcome to the Ranch
Toni Howlett
Ranch Hand

Joined: Jan 18, 2012
Posts: 35
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to update only one key=value pair in a .properties file with Java?