OK, whichever user under which the openHAB runtime is started will be the correct home (~
) directory, below which there should be .java/.userPrefs.
You can change this in your startup script by passing
-Djava.util.prefs.userRoot=/path/to/writeable/directory
and so the Java Preferences files will be read and written there.