[Logo]
Forums Register Login
Where to store application settings ?
If i got some app and i would like to store user's chosen settings, which option would be best? I got only idea to store data in sqlite or use some ini file. Put ini file would be too easy open and see sensitive data like passwords even if i encrypt them.
Check out the Java Preferences API. You're right about passwords though, those should be stored separately in a database or an encrypted file.
A database is a good choice because it is meant to store organizational information. You would still want to encrypt the passwords of course. I don't think a database is any more secure than a file for passwords though. Anyone with access could still view the encrypted password. Which SHOULD be secure either way because it is encrypted.
Thank you all for replies and i dont know now which to choose DB sqlite or that Pref API, if the Pref API is faster then I pick that.
If this is a desktop app I'd go with the Prefs API. There's no need to start messing with a database just for storing application preferences.
Yeha i thought same, so i am going to use Pref API
//Edit
Can't find file where it stores data?
[ July 14, 2008: Message edited by: mandlar suurla ]
I dont want to make new topic so i use my old one. So i tried to make use of my own configure class but that wasn't good idea. I am going to use pref API, but there is one little problem, as you insert or get the data you need to provide default data, but when i am using same fields in my app many times and in some other classes its like over typing same thing.

So my idea is to use "" empty string for default. If anyone got any good solution, then please help.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Oct 16, 2017 16:40:59.