Ticket #1093 (closed enhancement: moved)

Opened 8 years ago

Last modified 7 years ago

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 8 years ago 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 8 years ago by bdezonia

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

comment:3 Changed 8 years ago by bdezonia

  • Blocking 1344 added

comment:4 Changed 8 years ago by bdezonia

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

comment:5 Changed 7 years ago 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":  http://bugs.sun.com/view_bug.do?bug_id=4787931
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 7 years ago by bdezonia

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

comment:7 Changed 6 years ago by curtis

  • Status changed from new to closed
  • Resolution set to moved
Note: See TracTickets for help on using tickets.