- Drag and Drop
- Upgrading Java
- Contents of ImageJ folder
- Command Line Options
InstallationThe Windows version of ImageJ is available bundled with either Java 6 or Java 8, and without Java. All versions include ImageJ.exe, a Windows program contributed by George Silva that launches ImageJ (ij.jar). ImageJ.exe supports file-associations, drag and drop, auto-configuration and command line operation. If the jre folder (the Java runtime) is missing, ImageJ.exe detects the latest installed Java, generates the configuration file (ImageJ.cfg) and sets the memory limit to 2/3 of installed memory or 640MB, whichever is lower. Refer to the ImageJ.exe README for more information.
If the "ImageJ" window is too small, set "GUI scale" in the Edit>Options>Appearance dialog to a value greater then 1.0.
Use the Help>Update Image command to upgrade to newer versions of ImageJ.
MemoryUse the Edit>Options>Memory command to make more than the default 640MB available to ImageJ. Note that setting the "Maximum Memory" value to more than about 75% of real RAM may result in poor perfomance due to virtual memory "thrashing". The Edit>Options>Memory command modifies the third line in the ImageJ.cfg file in the ImageJ folder, which must be writable. This is what ImageJ.cfg looks like with "Maximum Memory" set to 1500MB:. jre\bin\javaw.exe -Xmx1500m -cp ij.jar ij.ImageJYou may get an error message that looks something like this:Unable to update the file "ImageJ.cfg C:\Program Files\ImageJ\ImageJ.cfg (Access denied)This error is the result of not have write access to the folder containing ImageJ. You need to either run ImageJ as an administrator, or to install it in a folder that you do have write access to, for example the Documents folder.
TroubleshootingHere are some common problems encountered when running ImageJ on Windows, and their solutions:
- ImageJ does not start.
Delete the ImageJ.cfg file in the ImageJ folder.
- The "ImageJ" window is tiny on my high resolution screen.
Upgrade to Windows 8.1 or later, open the ImageJ.exe>Properties>Compatibility panel and uncheck "Disable display scaling on high DPI settings".
- Cannot increase memory in Edit>Options>Memory & Threads or ImageJ unexpectedly runs out of memory.
Install ImageJ in a directory that you have write access to, such as "Documents" or "Desktop".
- ImageJ displays blank windows or windows filled with garbage.
Update video card driver or try running the nVidia Fix plugin
- Multiple copies of ImageJ are started when I open images by double clicking on them or by dragging and dropping them on the ImageJ icon.
Enable "Run single instance listener" in Edit>Options>Misc.
- I installed a 64-bit version of Java but ImageJ is using the 32-bit version.
Edit the second line of ImageJ.cfg to point to the 64-bit version of Java. For example, change "C:\Program Files (x86)\Java\jre7\bin" to "C:\Program Files\Java\jre7\bin".
- I installed the Windows 10 Creators Update and now ImageJ freezes when I try to open an image.
Enable "Use JFileChooser to open/save" in Edit>Options>Input/Output.
Drag and DropThe Windows version of ImageJ opens images, folders of images, text files, ROIs and LUTs dropped on the "ImageJ" window or on the the ImageJ application icon.
Upgrading to a Newer Version of JavaThis is what you need to do to upgrade to a newer version of Java:
- Download and install the latest JDK from www.oracle.com/technetwork/java/javase/downloads/
- Go to the ImageJ folder and delete or rename the jre folder
- Delete the ImageJ.cfg file
- Restart ImageJ and the launcher (ImageJ.exe) will generate a new ImageJ.cfg that uses the Java you just installed.
Contents of ImageJ Folder
- This JAR (Java Archive) file is the platform-independent core of ImageJ. It is the only file changed when you upgrade using the Help>Update ImageJ command.
- This is the ImageJ launcher.
- jre (optional)
- This folder contains the Java runtime.
- This folder contains example macros. The StartupMacros.txt file in this folder contains macros and macro tools that are automatically installed when ImageJ launches. To run a macro, drag and drop it on the ImageJ window and run it by pressing ctrl-r (Macros>Run Macro).
- This folder contains a small sample of the hundreds of plugins available for ImageJ. Plugins, macros and scripts in this folder, and immediate sub-folders, are installed in the Plugins menu when ImageJ launches.
- This folder contains LUTs (LookUp Tables) that are installed at startup in the Image>Lookup Tables menu. Use the Image>Color>Display LUTs command to view all the LUTs in this menu.
Command Line OptionsTo run ImageJ from the command line, open a Command window, change to the ImageJ directory, and enter a command something like this:The -Xmx1024m switch specifies that ImageJ will have available a maximum of 1024MB (1GB) of RAM.jre\bin\java -jar -Xmx1024m ij.jar
Specifies the port ImageJ uses to determine if another instance is running Example 1: -port1 (use default port address + 1) Example 2: -port2 (use default port address + 2) Example 3: -port0 (don't check for another instance) -debug Runs ImageJ in debug mode