This article explains how to install and configure IntelliJ IDEA for use with ImageJ development. Directions correspond to IntelliJ IDEA 11.1, and may need adjustment for other versions.
Install and configure IDEA
Import the ImageJ source
- From the IDEA menu, choose Version Control > Checkout from Version Control > Git
- For the Git Repository URL, enter: git://github.com/imagej/imagej.git
- Specify a Parent Directory, click Clone, and wait
- When prompted, click Yes to create an IntelliJ IDEA project from the sources
On some platforms, the first time you perform this procedure, you may be prompted to select the project JDK:
- Click the plus sign and choose "JSDK"
- Navigate to the directory containing your JDK installation
If there are non-compiling components outside of core and ui, you can tell IntelliJ not to build them by selecting them in the Project outline and pressing the Delete key (this will not remove the files nor the name from the outline).
Launch the program
- Choose Run > Edit Configurations from the menu
- Click the Plus icon and choose Application
- In the Name field, type "ImageJ"
- Type "imagej.Main" for the Main class
- For "Use classpath and JDK of module" select "ij-app" from the list
- Click OK
- Choose Run > Run 'ImageJ' from the menu
The project automatically builds before launching, so it may take a little while the first time.