Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preference API storage

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

like image 624
rupa Avatar asked Aug 24 '09 06:08

rupa


People also ask

What is API preference?

The Preferences API enables applications to manage preference and configuration data. Applications require preference and configuration data to adapt to the needs of different users and environments.

Where are Java preferences stored?

The user preferences are typically stored at user-home/. java/. userPrefs . The user preferences location can be overridden by setting the system property java.

What is pref in Java?

A node in a hierarchical collection of preference data. This class allows applications to store and retrieve user and system preference and configuration data. This data is stored persistently in an implementation-dependent backing store.

What is userPrefs?

The userprefs. xml file contains a series of ParameterName elements that contain a ParameterValue element. The names of the parameters you can set are contained in the ParameterName elements. Enter the value for these parameters in the associated ParameterValue elements.


1 Answers

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

like image 76
n002213f Avatar answered Sep 23 '22 23:09

n002213f