Is there a system-wide version of the API Preferences?

In the previous question, I learned about the preferences API. Unfortunately, this most likely depends on the user. I also have settings that need to be configured for all users. What is a platform-independent way to do this in Java?

EDIT:

The good information is below, however, since the introduction, I ran into a problem ... I tested it first in my dev-block (Win 7, UAC off), and it works fine. I tried this on the first of my test virtual machines, and it fails ... In Win 7 with UAC turned on, the recording fails (I can write the record and then read, and not get the value that I just posted there).

+3
source share
2 answers

systemNodeForPackage() and systemRoot methods of the Preferences class give you exactly what you want.

+4
source

Settings have both user and system prefs, carefully read the documents.

 Preferences.systemRoot(); Preferences.userRoot(); 
+5
source

Source: https://habr.com/ru/post/895334/


All Articles