Setting up IntelliJ IDEA

Sandro edited this page Apr 9, 2017 · 5 revisions

for developing DBpedia Spotlight.

Download IDEA


Java (JDK) must be installed for installing IDEA. Download ( and install the recent version.

If you are using Linux, you may have some difficulty to install the jdk. So follow this tutorial (for Ubuntu):

Install the Scala Plugin

On the start screen (when all projects are closed), on the top right corner:

Open Plugin Manager > Browse repositories > search for Scala > right-click on Scala > Download and install > Restart (For new version of IDEA,configure > plugins >search for Scala > right-click on Scala > Download and install > Restart).

Set up Maven

Please install Maven3. Builds with Maven2 are not supported any more.

You will need to set up M2_HOME (yes, even if it is Maven3) as an environment variable in your ~/.bashrc and/or ~/.profile, or the path to your Maven home directory in IDEA under File > Settings > Maven > Maven home directory

Checkout Code

VCS > Checkout from version control > Git >

Create project

File > New project... > Import project from external model > Maven > Root directory: $PATH_TO_DBPEDIA_SPOTLIGHT_CODE (For new version of IDEA,import project > choose path > Import project from external model > Maven) Tick "Import maven projects automatically"

Next > Next > Finish

Build project

Do Not build the project directly by Build->Rebuild Project. Otherwise, you would get building errors as shown in the following figure. Instead, go to right bar of Intellij, open 'Maven Projects', then open 'DBpedia Spotlight annotation framework (parent POM)' > 'Lifecycle' and double-click install. building error

Next steps

IntelliJ should handle all Maven dependencies correctly. If it does not, build the project with Maven outside of IDEA.

Tips for using IntelliJ

Mac OS X

If you use Mac OS X, you will likely have bad font rendering in IntelliJ. To fix this, edit the file /Applications/IntelliJ IDEA 11 by adding -Dawt.useSystemAAFontSettings=lcd to VMOptions. For example:

<string>-Xms128m -Xmx800m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=64m -XX:+UseCompressedOops -Dawt.useSystemAAFontSettings=lcd</string>
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.