Results 1 to 1 of 1
Thread: Saving application settings
- 11-16-2007, 02:30 PM #1
Saving application settings
I recently looked into the java.util.prefs.Preferences as long as a tutorial mentioned this as a possibility to save application preferences.
Two questions are coming up for me:
1. I am not sure if I should like that java.util.prefs.Preferences - they tell using it under Windows save something to the registry and under Linux to file system. Actually I do not like to save settings to the registry and I want to minimize differences of the behaviour of my application under different operating systems.
How do you store your application settings?
2. In general I can find the user home path usingThis folder can be used to save some user settings using different methods.Java Code:System.getProperty("user.home");
But how can I get to some common path (same for all users) - like /etc or <Documents and Settings>\All Users?
Further getting the application path seems to be a little difficult.
does not seem to be reliable because it brings different outputs whether I run the application in debugger or if calling it directly from commandline.Java Code:Main.class.getProtectionDomain().getCodeSource().getLocation().getPath()
Where do you store application specific settings (not user specific settings) - and how do you find out that path?Greetings, Martin Wildam.
Similar Threads
-
JVm Heap memory settings
By nagesh in forum Advanced JavaReplies: 2Last Post: 09-17-2009, 05:47 PM -
Graphic settings being overridden?
By sjchase in forum New To JavaReplies: 0Last Post: 01-16-2008, 11:27 PM -
JVM Heap memory settings
By nagesh in forum New To JavaReplies: 1Last Post: 08-11-2007, 10:17 PM -
Detecting Browser Settings
By arupranjans in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 07-31-2007, 02:31 PM -
Saving Variables
By Fish in forum New To JavaReplies: 6Last Post: 06-25-2007, 08:20 PM


LinkBack URL
About LinkBacks

Bookmarks