-
Notifications
You must be signed in to change notification settings - Fork 797
AIMA4e Using IntelliJ IDEA
Ciaran O'Reilly edited this page Mar 8, 2017
·
2 revisions
Note: You will require a GitHub account for these steps to work correctly.
- Select the menu item
VCS->Checkout from Version Control->GitHub
- In the
Clone Repository
dialog enter theGit Repository URL:
https://github.com/aimacode/aima-java.git
:
- Hit the
Clone
button (you will need to wait a little bit while the repository is downloaded to your local drive). - When the
Checkout From Version Dialog
pops up pressYes
:
- In the
Import Project
dialog select theImport project from external model
radio button and selectEclipse
:
- Hit the
Next >
button. - In the following
Import Project
dialog select options that suit your workspace:
- Hit the
Next >
button. - In the following
Import Project1 dialog
:
The three projects,aima-core
,aima-gui
, andaimax-osm
should be listed and be automatically selected (you can deselectaima-all
as it is not required). - Hit the
Next >
button. - In the final
Import Project
dialog ensure you have selected at minimum a version of the JDK equal or greater than 1.8:
- Hit the
Finish >
button. - Currently, the default branch is still AIMA3e. To switch to the AIMA4e branch, from the menu go to
VCS->Git->Branches...
and then selectorigin/AIMA4e->Checkout as new local branch
:
- The
core
,extra
,gui
directories may not appear in the Project tool window. To resolve this, close (File->Close Project
) and then reopen the project. Upon reopening, you should receive a notification about an unlinked Gradle project in the Event Log.
Click theImport Gradle Project
link to bring up this dialog:
HitOK
and then the project should refresh and show folders from the AIMA4e branch. - A dialog to import Gradle Project data should appear. Leave everything selected (default) and hit
OK
:
- At this point, if you try to build the project through
Build->Build Project
, you may see errors similar to the picture below:
Apparently, IntelliJ gets confused with the build settings in the default AIMA3e branch. One way to resolve this is to configure the project through Gradle. - Select the menu item
View->Tool Windows->Gradle
which will bring up the Gradle tool window. Click onExecute Gradle Task
:
- Type
build
in the Gradle command line (gradle build
) and then hitOK
. You should see the build process execute and succeed:
Building the project from the menu itemBuild->Build Project
from this point onwards should also succeed. - You should now be able to work with the AIMA4e projects in IntelliJ. Try to run the
AIMADemoApp
throughaima-java/gui/src/main/java/aima.gui/app/AIMADemoApp.java
.