1

After saving some application preferences via java.util.prefs API, I cannot find them. This is a Windows 7 machine and I searched registry for the path JavaFXApp1 and individual values I've saved such as CurrentColor, but found nothing.

The values have been saved for certain, as the application reads them when it starts.

Where does Java preferences API store the values under Windows? This is my saving and reading code:

Preferences prf = Preferences.userRoot().node("/JavaFXApp1");
prf.putInt("CurrentColor", appCtrl.getIValue());

Preferences prf = Preferences.userRoot().node("/JavaFXApp1");
i = prf.getInt("CurrentColor", 0);
ajeh
  • 2,652
  • 2
  • 34
  • 65
  • possible duplicate of [Where are the Java preferences stored in Windows 7?](http://stackoverflow.com/questions/4947555/where-are-the-java-preferences-stored-in-windows-7) – jewelsea Oct 22 '13 at 23:03
  • 1
    And for God's sake, why was the key name changed to `/Java/F/X/App1`??? No wonder I could not find it. It butchered the value names in the similar manner: `/Current/Color` etc. It even added a forward slash in front of one text value's text: `/Programmatically set text`. Unless this has a rock solid justification, this would make configuration management a nightmare. – ajeh Oct 23 '13 at 13:32
  • Just don't use camelCase rather go for current-color type of case (forgot what exactly its called). – Gaurav Sarma Dec 04 '17 at 22:49
  • Take a look at this: [In Java, why does WindowsPreferences use slashes for capital letters?](https://stackoverflow.com/q/23001152/4071001) – lcnicolau Jul 06 '19 at 16:16

0 Answers0