Skip to main content

Setting up IntelliJ to work with DBpedia Extraction Framework

So I started to work with DBpedia as a volunteer from this November.
I've never worked in a [big] open source project before, so this chance really fuels me with great excitement. I decided to use this blog to share what I've thought/learnt/done. It's always a good move to do so for future reference. And it can help people who have the same interest.

My very first post (yes, this is the one, I am a new blogger although I've always wanted to do this long ago) is about getting started with the DBpedia Extraction Framework (DEF). In particular, to set up your IDE to work with DEF.

Although there is already an excellent guide on how to getting started, I still find myself struggle a little bit before finally have everything work. Reasons? I am a complete newbie with IntelliJ and DEF; and Scala.

Okay, so why IntelliJ?
I've been always an Eclipse lover. Hence, after cloning the project from github I was eager to import it into Eclipse. I got a bunch of errors after importing, which was something I expected. What I didn't expect though, is that my Eclipse+Maven+Scala experience doesn't help much in resolving all these problems (in a reasonable amount of time). Also, it turns out that "Scala and Eclipse aren't best friends" (as my mentor said) I guess it's time to give IntelliJ a try ;)

So here is the guide to set up IntelliJ for Window user, who want to start working DEF. This guide is very similar with the github guide above, except that I provide links and screenshot a long the way to make it easier to follow.
  1. Download IntelliJ, community version from the official website
    https://www.jetbrains.com/idea/download/#section=windows
  2. Install IntelliJ and start it up after installation complete.
    - For first time use: detail can be found at IntelliJ first time launching. For this DBpedia extraction framework, we need to use Scala plugin so install it.

    /help/img/idea/2017.2/ij_set_featured_plugins.png
    - Otherwise: you can download Scala plugin as follow: go to start screen, on the top left corner: Go to Open> Settings > IDE Settings > Plugins > Browse Repositories > search for Scala > right-click on Scala > Download and install > Restart
  3. Fork the project from github and clone it to your local computer
  4. Import the project to IntelliJ
    - File > New > Project from Existing Sources and choose your_path_to_the_framework/extraction-framework:


    - Click OK.
    - Choose Import project from external model and select Maven. Next
    - Tick the "Import Maven projects automatically" like this:

    Next. Next
    - Select SDK: Click icon + to add JDK 1.7+ (mine is 1.8 but it should work with JDK from 1.7)
    - Finish.
  5. Edit Run configuration
    There are several applications to run. I'll show here the configuration for running server. Other applications such as download, extraction can be found in the guide.
    From the menu bar, choose
    Run -> Edit Configurations...
    click "+" -> Application -> Set parameters as follow:


    For main class, either type it yourself, or you use the brower button (...) then check for the Server that has function (f) main (the 2nd Server as in the image above).
    Click OK.
  6. Run Server
    - Edit base_dir in server.default.properties: edit the base_dir (first line) for server directory. Save the file.
    - From the menu bar, choose Run -> Run Server
    Your DBpedia server should be running and listen at port 9999 like this:

  7. Check your browser at  http://localhost:9999/server/ and you should see the server up with something like this:



    And now, you are set :D 😀😀😀
    And I'm done with my first post in this blog too so yay \m/

Comments