The ImageJ launcher is a native application for launching ImageJ.
The launcher supports the following flavors of ImageJ:
The launcher is a native executable whose purpose is to start up a Java Virtual Machine and run ImageJ 1.x, Fiji or ImageJ2 in it. It is used in the ImageJ 1.x releases, the Fiji distribution as well as in ImageJ2. It is built by the ImageJ Jenkins server (i.e. the server that builds and tests all ImageJ and Fiji source code continuously).
The ImageJ launcher source code lives on GitHub.
The launcher provides a platform-specific entry point into the ImageJ Java application. Its most major function is to facilitate the ImageJ Updater feature by taking care of pending updates when ImageJ is first launched.
For an overview of supported options, run:
where xyz is your platform.
The launcher can do all kinds of things, like:
- Launch ImageJ with a different amount of memory (
- Run macros and scripts in headless mode
- Control the Updater from the command line
- Open images: ./ImageJ-<platform> example.jpg
- Call the Jython interpreter: ./ImageJ-<platform> --jython (the classpath will be the same as when calling ImageJA), and likewise --jruby, --bsh and --js for the respective language's command-line interpreters
- Run Fiji with the system Java instead of its own one: ./ImageJ-<platform> --system. But beware: this might fail since some plugins need at least Java 1.5, and the 3D viewer needs Java3D.
- Show the java command line instead of running Fiji: ./ImageJ-<platform> --dry-run
- Compile a Java class: ./ImageJ-<platform> --javac example.java
- Run a Java class' main() method: ./ImageJ-<platform> --main-class=example
- Pass some Java options: ./ImageJ-<platform> -server -- (everything that comes before a -- is interpreted as Java option)
- Add . to the classpath and execute the given class' main() method: ./ImageJ-<platform> Example.class
- Link Fiji into the PATH: ln -s $(pwd)/ImageJ-<platform> $HOME/bin/fiji && fiji
- Start Fiji and run a menu entry directly: ./ImageJ-<platform> --run System_Clipboard (the underscore was used in place of a space to avoid having to quote the argument)
The launcher comes with ImageJ1, ImageJ2 and Fiji.
If you want to test the latest UNSTABLE version, it can downloaded here:
After download, rename to match the filename given above. For MacOS and Linux binaries, set the executable bit using
chmod +x. Then replace the launcher with the new one, keeping a backup of the previous launcher in case the new one does not work.