Set up project in JetBrains IDEA

There is short manual how to setup up project in JetBrains IDEA. Other ideas are not recommended, but you can use them. This manual is written only for JetBrain IDEA.

Clone project

First step is clone project from GitLab to your folder. Open command line and go to location, where you want to have Java project. To clone the project run these command:

$ git clone git@gitlab.fit.cvut.cz:BI-ZNS/framework.git

This will create folder for project. If git clone raise exception, that you don’t have right for clone this project, go to FIT GitLab and set up your private key.

Set up Idea

Next start JetBrains IDEA and open folder with cloned project. First step is set up project settings.

1) Go to the File -> Project Structure

_images/menu.png

2) Set up project SDK and target folder

In the sub menu Project Select SDK. If you have installed Java with SDK, just select your version of Java from drop down list. If your java installation is not listed, add path to your Java installation with new button. If you don’t have Java installed, download Java from official webpage. In the same sub menu select the output directory. In this directory will be located build files.

_images/project_structure_1.png

3) Setup source folder in modules

In the sub menu Modules go to the tab Sources. There select src folder in the tree view and mark this folder as source folder with button on the top of the tree view (blue icon folder).

_images/modules.png

4) Set up external libraries

Go to the sub menu Libraries and click on green plus button. From drop down menu select Java. In popup windows select path to folder lib in your project and select file net.sf.tweety.tweety-full-1.10-with-dependencies.jar. Accept selection with OK button.

_images/libraries.png

5) Run compile and project

Now in the project files locate the main file src/expertsystemfw/ExpertSystemFW, right click on that file a select Run ExpertSystemFW.main(). This should build java project and run that project in the console.

_images/console.png