NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #1093 (closed enhancement: moved)

Opened 2012-04-10T09:36:43-05:00

Last modified 2013-06-07T16:02:08-05:00

Store ImageJ user config in user space

Reported by: curtis Owned by: bdezonia
Priority: major Milestone: imagej2-unscheduled
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1344


The ImageJ2 configuration should be stored in a single folder beneath the user's home directory, according to the conventions of the operating system:

  • Windows: ${user.home}\Application Data\ImageJ
  • Mac OS X: ${user.home}/Library/Preferences/ImageJ
  • Linux: ${user.home}/.imagej

The ImageJ.cfg file should live there, as well as all persisted properties. At the moment, such properties are scattered around by te Java preferences API; e.g., on OS X:

  • ${user.home}/Library/Preferences/imagej.*
  • ${user.home}/.java/.userPrefs/imagej

Lastly, there should be user plugins and jars folders located in the same place, where additional plugins can be installed.

Change History

comment:1 Changed 2012-04-10T09:37:49-05:00 by curtis

For Mac OS X, I am not 100% certain it would be appropriate for user plugins to in ~/Library/Preferences/ImageJ, but I am not sure where a better location would be. Perhaps ~/.imagej, similar to Linux?

comment:2 Changed 2012-05-14T11:13:48-05:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta3 to imagej-2.0.0-beta4

comment:3 Changed 2012-07-17T15:42:52-05:00 by bdezonia

  • Blocking 1344 added

comment:4 Changed 2012-08-03T11:02:52-05:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta4 to imagej-2.0.0-beta5

comment:5 Changed 2013-02-28T15:08:32-06:00 by gharris

May want to consider this issue:

I've run into this problem a couple of times on Windows 7;
I get an error finding and saving IJPrefs...
Because IJPrefs is now put in the user's directory (rather than ImageJ's dir)
is seems that we've run into a "long outstanding bug in Java":
There are situations where System.getProperty("user.home") gives the wrong directory, so I guess that Prefs#load() fails. It looks as though getting the user.home directory can reliably be gotten this way:

(I also posted this to the ImageJ mailing list.)

comment:6 Changed 2013-06-07T16:02:08-05:00 by bdezonia

  • Milestone changed from imagej2-b7-ndim-data to imagej2-unscheduled

comment:7 Changed 2014-09-02T17:13:36-05:00 by curtis

  • Status changed from new to closed
  • Resolution set to moved