Page history Edit this page How do I edit this website?

MacOS

icons/macos

Think different.

macOS (formerly called Mac OS X, then OS X) is Apple’s desktop operating system. It is the second most common desktop computing platform after Windows. This page details issues specific to using ImageJ and friends on macOS systems.

Installation

See also the Java 8 page for OS-X-specific issues.

Troubleshooting

See also the Troubleshooting page.

ImageJ becomes very slow after running for a while

There are several reasons ImageJ can run slowly on macOS.

Java painting bug

On macOS, older versions of Java 8 (prior to 1.8.0_45)—as well as all versions of Java 7 (including 1.7.0_80)—are extremely slow at displaying images. You should either upgrade to the latest version of Java 8, or revert to Java 6 (see “Frequently Asked Questions” below).

Window menu bar bug

There is a bug in Java 8 on macOS which causes the application to drastically slow down as many windows are opened and closed over time. Make sure you are using the latest version of Java 8, as well as the latest version of ImageJ.

App Nap

With macOS version 10.9 “Mavericks” and later, there is an “App Nap” feature which dramatically slows down applications that are not in the foreground. Leave ImageJ in the foreground while it is processing to avoid this issue. (There are also various ways to disable App Nap on your machine, but we have not had much success with them. If you find a solution that works, allowing ImageJ to run fast in the background, please tell us on the forum!)

No title bar in file chooser dialogs

On macOS 10.11 “El Capitan” and later, the operating system no longer includes a title bar for file chooser dialogs. See e.g. this JDK bug discussing the issue.

As a workaround, you can check “Use JFileChooser to open/save” in the EditOptionsInput/Output… dialog.

Frequently Asked Questions

See also the Frequently Asked Questions page.

How do I run ImageJ with Java 6?

It is unfortunately no longer feasible to install Apple Java 6 on current versions of macOS. However, ImageJ should work OK with Java 8. If you have difficulties, please post on the Image.sc Forum.

At any time, you can verify which Javas are installed on your system using this script.

How do I run ImageJ with JavaFX support?

Whether JavaFX is supported on macOS depends on the version of Java that is used. You can check the version of Java packaged with ImageJ2 or Fiji by right-clicking the app and viewing the contents. Then go into the java/macos folder. Versions of java starting with jdk1.8.0 should support JavaFX. However, if you see the default upon installation, adoptopenjdk-8.jdk, you will not have JavaFX support. In this case, you can add JavaFX support by replacing this will the Azul JDK that comes with JavaFX included as described here.

“You can check if you have JavaFX installed using the PluginsUtilitiesFind Jar for Class command and searching for javafx.scene.Scene. If you can’t find this class then you don’t have JavaFX installed.

Fiji tips

Accessing Fiji’s plugins and macros folders

To access the plugins or macros folders, set the Finder window to either icons or lists mode, not in column mode, and double-click them.

Alternatively, right-click (or ⌃ Ctrl +  Left Click) the Fiji.app and select “Show package contents”, to open the folder where the actual plugins and macros folders are.

Running Fiji on the command line

Often it is necessary to run Fiji on the command line, e.g. to pass some command-line options. To do so, start a Terminal (in the Finder, GoUtilities), and switch to the correct directory using the cd command. Note that the application itself is actually a directory called Fiji.app. For example, if you installed Fiji into /Applications as recommended, do this:

cd /Applications/Fiji.app

If you unpacked Fiji onto your desktop, do this:

cd $HOME/Desktop/Fiji.app

Once you switched to the correct directory, start the ImageJ launcher:

Contents/MacOS/ImageJ-macosx

A backslash (\) is not the same as a slash (/). So: Contents\MacOS\ImageJ-macosx will not work.

Now you can pass, say, Java Options:

Contents/MacOS/ImageJ-macosx -verbose:gc --

To distinguish between options intended for Java and options intended for ImageJ, you need to separate the former from the latter with a double-dash: --. Since the default is to accept ImageJ options, you have to pass a trailing double-dash if you want to pass only Java options.

macOS keyboard shortcuts

It is often helpful to use keyboard shortcuts when using ImageJ. There are also operating system specific shortcuts which can be quite helpful. For example, pressing ⌘ Command + ⇥ Tab and releasing first only the ⇥ Tab key will allow you to cycle through the running applications, while ⌘ Command + \` will do the same for the windows opened by the current application. Dave Polaschek has a comprehensive list.