This guide describes the required steps to set up the development environment for IQM using Eclipse, Subversion, and Maven.
Download and install the Oracle JDK 1.7 or higher for your operating system (OS) from here.
Ensure, that the Oracle JVM is installed correctly and set as your default JVM by typing:
$ java -version
The output should yield something like:
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
According to the installation instructions and depending on your OS you will have to set environment variables for JAVA_HOME; simply follow the guides and install everything in the default paths.
Download the Eclipse SDK (e.g. Juno 4.2.x) from here and unzip it to a custom location.
Install some useful Eclipse plugins for the development as you like:
- Subclipse (<http://subclipse.tigris.org/>, Eclipse update site: <http://subclipse.tigris.org/update_1.8.x>)
- WindowBuilder (<http://www.eclipse.org/windowbuilder/>, Eclipse update site: <http://download.eclipse.org/windowbuilder/WB/release/R201209281200/4.2/>)
- MoreUnit (<http://moreunit.sourceforge.net/>, Eclipse update site: <http://moreunit.sourceforge.net/update-site/>)
Of course you are free to install any other Eclipse version or IDE using the package manager on your Linux system, but keep in mind the compatibility of your plugins.

Run Eclipse, select a workspace for the development and hit OK.
Note: Subsitute <yourUser> with your user name or choose a different custom location.
On other systems than Linux, you might have to change the default workspace encoding to UTF-8.
Use Window -> Preferences from the Eclipse menu and search for "encoding".

This is important, since internationalization may be stored in UTF-8 encoded text files.
Set the default JVM to JDK 1.7 on your system.

Download Apache Maven from here and install it according to the installation instructions for your OS. You can find a quickstart guide here.
We recommend to use the precompiled binaries for your platform.
When your installation is successful, run
mvn --version
from your command line, which should produce something like the following, depending on your OS:
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Maven home: /usr/local/apache-maven/apache-maven-3.2.1
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"
Download and install Apache Subversion according to the installation instructions for your OS.
In order to check out the source from the IQM SVN repository, you have to create a directory at a file system location where the source files will be stored.
You have to have write permissions on that directory. For this guide, we will use the %IQMROOT% variable referring to this directory.
For convenience, we will create an iqm-source folder in the user's home directory for this purpose, so that %IQMROOT% points to
/home/<yourName>/iqm-source (Linux), /Users/<yourName>/iqm-source (Mac OS X), or C:\Users\<yourName>\iqm-source (Windows), respectively.Enter the following commands on the command line:
$ cd ~/iqm-source
$ svn checkout https://svn.code.sf.net/p/iqm/code-0/trunk/iqm .
Subversion will check out all files from the trunk/iqm directory to %IQMROOT%.
See wiki page on [Tortoise Checkout].
Use the pre-configured script import_custom_libs.* from the %IQMROOT%/application directory in order to import all required libraries not available in central maven repositories.
On Windows systems simply execute the batch file import_custom_libs.bat, on Unix based systems execute the bash script from the shell using ./import_custom_libs.sh.
Maven will download any required libraries and create a repository at the user's home directory using .m2 as the base for the maven repository.
The project is pre-configured for an automated creation of eclipse projects for the IQM modules.
The superior (top-level) pom.xml is located in %IQMROOT%/application/.
Open a new command prompt at the pom's location and type
mvn clean eclipse:clean eclipse:eclipse
in order to create entirely new projects.
The output should be something like the following:
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] IQM ............................................... SUCCESS [7.034s]
[INFO] IQM - API ......................................... SUCCESS [6.592s]
[INFO] IQM - Standard Image Operator Bundle .............. SUCCESS [2.725s]
[INFO] IQM - Standard Plot Operator Bundle ............... SUCCESS [0.218s]
[INFO] IQM - Application Core ............................ SUCCESS [0.308s]
[INFO] IQM - Application ................................. SUCCESS [0.788s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.184s
[INFO] Finished at: Wed May 15 18:30:49 CEST 2013
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------
Run Eclipse and select File -> Import..., select General -> Existing Projects into Workspace and hit "Next":

Select the root directory by browsing to %IQMROOT%:

Keep all projects selected and hit FINISH.
If you encounter the "Failed to load JavaHL library" warning, do the following as suggested here.
You will get some errors in the first place, but these are quickly resolved by adding the variable M2_REPO as classpath variable in Eclipse.

Select Window -> Preferences and search for "Classpath Variables" and hit the New... button.

Add the path to your local maven repository, which is located at your user directory at .m2/repository.

Create a new run configuration:
iqm-app projectat.mug.iqm.main.IQM as the main class
Hit "Run" and the application will start within your Eclipse IDE.
Wiki: Debugging
Wiki: Home
Wiki: Tortoise Checkout
Anonymous