Preference API storage

后端 未结 2 1153
情书的邮戳
情书的邮戳 2020-12-15 16:53

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

2条回答
  •  盖世英雄少女心
    2020-12-15 17:15

    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

提交回复
热议问题