This article explains how to install and configure Eclipse for use with ImageJ development. Directions correspond to Eclipse 3.7 Indigo, and may need adjustment for other versions.
Setting up Eclipse on Windows
Install Java Development Kit
Download and install JDK 6 from the Java web site .
Take note of where the Java installation ended up; for the remainder of this guide we will use "C:\Program Files\Java\jdk1.6.0_20 " though your path is likely to be different.
Install Eclipse
Download Eclipse from the Eclipse web site . We recommend using either "Eclipse Classic" or "Eclipse IDE for Java Developers."
Unpack the ZIP file to a location of your choice. On Windows 7, to avoid permissions issues, we recommend using your personal Programs folder. Take note of this path; for the remainder of this guide we will use "C:\Users\you\Programs\eclipse " though your path is likely to be different.
Configure Eclipse
Next, use Wordpad to edit the eclipse.ini file in C:\Users\you\Programs\eclipse . (Do not use Notepad, because it will not handle the Unix-style line breaks properly.) Carefully follow these instructions to specify the proper JDK. Then save the file and quit Wordpad.
Now update Eclipse's JRE to be JDK-aware:
Launch Eclipse
From the menu choose Window > Preferences
Select Java > Installed JREs
Click Search..., navigate to "C:\Program Files\Java\jdk1.6.0_20 " and click OK
Check the box next to the JRE that appears and click OK
Setting up Eclipse on Mac OS X
Install Eclipse
Download and install Eclipse from the Eclipse web site . We recommend using either "Eclipse Classic" or "Eclipse IDE for Java Developers."
Setting up Eclipse on Linux
Install Eclipse
Download and install Eclipse from the Eclipse web site . We recommend using either "Eclipse Classic" or "Eclipse IDE for Java Developers."
Unpack the tarball to a location of your choice. To avoid
permissions issues, we recommend using a folder in your home directory such as ~/eclipse.
Alternately, you can install Eclipse using the package manager—e.g., on Ubuntu:
sudo aptitude install eclipse
But be careful that a new enough version is available; e.g., Ubuntu 11.04 comes with Eclipse 3.5 Galileo, which is too old to work with m2e, whereas Ubuntu 11.10 provides Eclipse 3.7 Indigo in the package manager.
Install required Eclipse plugins
Subversive (for SVN support)
From the Eclipse menu, choose Help > Install New Software...
In the "Work with:" dropdown, choose "--All Available Sites--"
In the filter box, type "subv"
Check the box next to "Subversive SVN Team Provider"
Click Next twice
Accept the license agreement and click Finish
The first time you use a Subversion-related feature in Eclipse, you will be prompted to choose a Subversion SVN Connector. Check the box next to the newest SVN Kit (1.3.5 as of this writing) and click Finish.
m2e (for Maven support)
From the Eclipse menu, choose Help > Install New Software...
In the "Work with:" dropdown, choose "--All Available Sites--"
In the filter box, type "m2e"
Check the box next to "m2e - Maven Integration for Eclipse" under "Collaboration"
Click Next, then Finish
m2e-subversive connector
From the Eclipse menu, choose File > Import...
Double-click on "Check out Maven Projects from SCM" under Maven
On the next screen, notice there are no connectors available in the "SCM URL" combo box; click the "m2e Marketplace" link on the bottom right to set one up
On the Marketplace screen, type "subv" into the Find box
Check the box next to the "m2e-subversive" connector, and click Finish
When the Install dialog appears, click Next twice, accept the license, and click Finish
Click OK to ignore the warning about installing unsigned content
Click Yes to restart Eclipse
Check out ImageJ
Choose File > Import from the Eclipse menu
Select "Check out Maven Projects from SCM" and click Next
For SCM URL, choose "svn" and enter: http://dev.imagejdev.org/svn/imagej/trunk
Click Finish
When the Maven Projects dialog appears, click Select All and Finish.
Alternately, if you already checked out the source code outside Eclipse , you can use the File > Import Existing Maven Projects command to import the projects instead.
Launch the program
In the Package Explorer, expand the project called "ij-app"
Navigate into src/main/java
Navigate into imagej
Right-click on Main.java
Choose "Run As" and then "Java Application"