This article explains how to install and configure IntelliJ IDEA for use with ImageJ development.
Install and configure IDEA
Check out ImageJ
- From the IDEA menu, choose Version Control > Checkout from Version Control > Subversion
- Click the Plus icon, and from the Repository URL, enter: http://code.imagej.net/svn/imagej/trunk
- Click OK, select the repository from the list, and click Checkout
- Choose the local folder where you wish to store the source code and click OK
- Click OK to the SVN Checkout Options, and OK to the Subversion Working Copy Format
- When prompted, click Yes to create an IntelliJ IDEA project from the sources
- Choose to "Import project from external model" and click Next
- Choose Maven and click Next
- Check "Search for projects recursively" and "Import Maven projects automatically" and click Next
- Click Next past the "Select profiles" screen
- Click Next past the "Select Maven projects to import" screen (all projects should be checked)
- Click Finish
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
- Type "imagej.Main" for the Main class
- For "Use classpath and JDK of module" select "imagej" from the list
- Click OK
- Choose Run > Run from the menu
The project automatically builds before launching, so it may take a little while the first time
