1

I'm using ImageJ on MacOS X. Currently the ImageJ properties utility is reporting the Macros and Utilities directories as "null"

IJ.getDir("plugins"): null
IJ.getDir("macros"): null

I can set the directories using the following command from the command line.

java -Xmx1024m -jar /Applications/ImageJ/ImageJ.app/Contents/Resources/Java/ij.jar -ijpath /Applications/ImageJ

How does one set the ijpath when double clicking the ImageJ application (imagej.app)?

agf1997
  • 2,668
  • 4
  • 21
  • 36
  • The IJ path seems to get set based on the .app location when it is run for the first time. I was able to fix the issue by deleting the app and reinstalling it making sure the .app file was in the directory with the /macros and /plugins directories. I'd still be nice to know how to reset the ij path without having to reinstall. – agf1997 Oct 31 '16 at 21:28

1 Answers1

1

ImageJ is designed to look (every time it runs) for the plugins directory in the same folder where ImageJ.app is located. If you want to override that, you can use the command as you have found, or you can edit the Info.plist file that is inside the ImageJ.app folder.

  1. Right-click on ImageJ.app and select Show Package Contents.
  2. Open Info.plist (if you have Xcode it will be the default to open that file) and append to the Java->VMOptions line the location of the plugins folder you want to use, for example:

    VMOption -Xms256m -Xmx3000m -Dplugins.dir=/Users/me/myplugins

If the directory you specify doesn't exist, it just reverts to the default of looking where ImageJ.app is.

For more info see: imagej.net and plugin-dirs

Chris Wood
  • 21
  • 5