Reputation: 19808
I have the following code:
Preferences prefs = Preferences.userRoot().node("c:/test.txt");
System.out.println(prefs.get("aa", "not found"));
prefs.put("aa", "bb");
which works fine (the first time it shows "not found" and after it shows "bb").
But I can't find my test.txt file.
Any idea where it is ?
Upvotes: 1
Views: 667
Reputation: 11254
Java Preferences
are not stored in files (to do that you should dump them manually using OutputStream
- Preferences.exportNode(OutputStream stream);
). On Windows they are stored under HKEY_CURRENT_USER\Software\JavaSoft\Prefs
. So there you will find node "c:\" and node "test.txt" under it.
Upvotes: 2