Install Eclipse, Maven, and Mercurial
We recommend version 4.4 (or superior) of Eclipse.
In Eclipse website, there are three distributions suitable for OpenMarkov development:
- Eclipse Classic
- Eclipse IDE for Java Developers
- Eclipse IDE for Java EE Developers
We recommend "Eclipse IDE for Java Developers" because it includes the Maven plugin, which is required to develop OpenMarkov, and is smaller than "Eclipse IDE for Java EE Developers". We recommend users of Linux distributions like Debian and derivatives (Ubuntu or Linux Mint, for example) to install Eclipse from the Eclipse website instead of from the official repositories of the distribution.
You will get a zip file that you must uncompress where you wish.
This step is only necessary if you installed "Eclipse Classic", and therefore it should be omitted if you installed "Eclipse for Java Developers" or "Eclipse IDE for Java EE Developers"
Open Eclipse, go to "Help -> Install new software" and click on "Add". In the "Add Repository" dialog, write "Maven" as the name and http://download.eclipse.org/technology/m2e/releases.
Install all the packages suggested by Eclipse.
Even if you installed "Eclipse for Java Developers" or "Eclipse IDE for Java EE Developers", you need to install Mercurial, as follows.
Open Eclipse, go to "Help -> Install new software" and click on "Add". In the "Add Repository" dialog, write "MercurialEclipse" as the name and http://mercurialeclipse.eclipselabs.org.codespot.com/hg.wiki/update_site/stable/ as the location. Wait for a few seconds until Eclipse displays a list of recommended packages. Install the packages that Eclipse suggests.
Restart Eclipse and, if necessary, close the Welcome page.
Configure the Java virtual machine
Make sure that you have downloaded the JDK 7 (Java Development Kit, version 7). It includes development tools such as the Java compiler, Javadoc, Jar, and debugger, which are not included in JRE (Java Runtime Environment).
In Eclipse, go to Window > Preferences > Java.
- In "Compiler", the "Compiler compliance level" must be 1.7.
- In "Installed JREs", select jre7.
Configure the text file encoding
Text file encoding of source files in OpenMarkov is UTF-8. This is the default encoding of Eclipse in linux; thus, linux users can skip this step. Windows and Mac users must go to "Window > Preferences > General > Workspace", click on "Text file encoding > Other", and select "UTF-8".
Configure Eclipse to access the source code of Maven artifacts
Eclipse must use Maven to download automatically the JAR files necessary to compile the code of a working project. Please leave unchecked the 'Do not automatically update dependencies from remote repositories' option.
If you wish to access not only the compiled code of those APIs (packed in JAR files) but also their source code (when available), go to "Window -> Preferences -> Maven", and check "Download Artifact Sources". We recommend that you also check "Download Artifact JavaDoc".
Do not check "Update Maven projects on startup" now, because it may lead to a high number of errors when downloading OpenMarkov by the first time.