Downloading and Building Fiji From Source

Revision as of 03:27, 14 April 2009 by JeanYvesTinevez (talk | contribs) (Added categorization)

Downloading the Source Code with Git

Warning: the source code for Fiji is rather large; make sure that you have two gigabytes of disk space free before beginning this.

To fetch the Fiji source code you should use git (Windows users, please go here). If you are not familiar with Git, you might want to read this page or these pages instead.

Your first step should be to "clone" the fiji repository with the following command:

git clone git://

This should start downloading the base fiji repository and unpack it into a directory called "fiji" in your current directory. Once this has successfully completed, change into the newly created "fiji" directory.


Some plugins are managed as submodules. If you want to work on them, you will have to initialize and update them. (For more on submodules, see the Git submodule tutorial.) These submodules must be initialized and updated with the following commands:

git submodule init ImageJA TrakEM2 VIB micromanager1.1 mpicbg
git submodule update

The build system will attempt to use the system Java installation if it is available. However, on some platforms this may not work (or you may not have a recent enough Java installation) so we recommend that you also initialize and update the appropriate Java submodule for your system. To do this, run one of these commands:

git submodule init java/linux          # For 32-bit Linux systems
git submodule init java/linux-amd64    # For 64-bit Linux systems
git submodule init java/macosx-java3d  # For MacOS X systems
git submodule init java/win32          # For 32-bit Windows systems
git submodule init java/win64          # For 64-bit Windows systems

Then update the submodules again with:

git submodule update java/<the-name-for-your-OS>

Note: using git submodule update without specifying which submodule, will update all submodules. What update means: "put all submodules, if checked out, to the last commit that was committed in the fiji repos". Which is most likely not what you want--will put any submodule that you have been working on into a (no branch) situation. To fix it, just cd to that submodule git checkout master or whatever branch you were working on.

Getting a snapshot without Git

If you insist on not using Git, you can download a snapshot of Fiji here, but you need to make sure that you have a new enough Java version installed.

Building Fiji from Source

You should now be able to build Fiji with:

sh run

... which will invoke Fiji's multi-platform build system. If all goes well, after some time you should see the main Fiji window:

Fiji's main window