Sun itself, with its java control panel, had the same problem ( bug 6487334) : their control panel, working with different integrity, could not both read and write to their deployment directories.
They ported it to c:\users\<username>\appdata\local , but should not rely on System.getProperty("user.home") because to this day it uses the registry key, which may be set to the wrong value if "tweaked" windows: error 6519127
So the question is How to get the local application data folder in Java? using HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\* , this is the right place to start looking for read and write access for your settings.
You can read it, for example, the SWT Win32 Extension project .
The interest in saving your data in a user homedir is that it will be part of a user profile, which can be a roaming profile , saved when you log out and restored when you log in (often used on corporate workstations)
source share