Preference API storage

rupa picture rupa · Aug 24, 2009 · Viewed 16.4k times · Source

If I use the Preference API to store user or system preferences, where are they stored on Windows and Unix?

Answer

n002213f picture n002213f · Aug 24, 2009

For Windows systemRoot and userRoot are stored in HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs and HKEY_CURRENT_USER\Software\JavaSoft\Prefs respectively.

For Unix systemRoot and userRoot are stored in "/etc/.java" and "${user.home}/.java/.userPrefs", respectively.

Note that for Unix the locations can be changed by specifying "java.util.prefs.userRoot" and "java.util.prefs.systemRoot" properties