Where are the preferences of PrefService stored in the Hard Drive?

Hello everyone,

I am using the PrefService to store some serialized objects that I want to preserve in order to be able to use them even after the user restarts Fiji etc. My plugin is written in Java.

Unfortunately, I noticed some bugs with my code in fresh installations of Fiji where PrefService has not been used before.

I temporarily used the clearAll() method to remove everything stored using the PrefService in order to debug the plugin and fix the bugs.

Now I would also like to test the plugin in a number of test machines installing my plugin directly from its update site. I need to remove the old preferences first.

The problem is that I do not know where the PrefService's preferences are actually stored in the Hard Drive. Can someone tell me where they are stored ?

I have tried deleting both the Fiji.app directory and .imagej in $HOME/.imagej in Linux but the preferences were still present.

This is a link to the scijava javadoc for the PrefService: https://javadoc.scijava.org/SciJava/org/scijava/prefs/PrefService.html Unfortunately, it does not seem to contain this information and I was not able to find it anywhere else.

Thank you for your help!

Try to look into hidden folder in home directory, e.g. $HOME/.java/.userPrefs/


The answer given is correct in Linux but I did not find any of the directories contained in $HOME/.java/.userPrefs/ in Windows.

Does anyone know where the PrefService stores its data in Windows ?