-
Couldn't load subscription status.
- Fork 803
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 Repositorydialog enter theGit Repository URL:https://github.com/aimacode/aima-java.git:
- Hit the
Clonebutton (you will need to wait a little bit while the repository is downloaded to your local drive). - When the
Checkout From Version Dialogpops up pressYes:
- In the
Import Projectdialog select theImport project from external modelradio button and selectEclipse:
- Hit the
Next >button. - In the following
Import Projectdialog select options that suit your workspace:
- Hit the
Next >button. - In the following
Import Project1 dialog:
The three projects,aima-core,aima-gui, andaimax-osmshould be listed and be automatically selected (you can deselectaima-allas it is not required). - Hit the
Next >button. - In the final
Import Projectdialog 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,guidirectories 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 Projectlink to bring up this dialog:
HitOKand 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->Gradlewhich will bring up the Gradle tool window. Click onExecute Gradle Task:
- Type
buildin 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 Projectfrom this point onwards should also succeed. - You should now be able to work with the AIMA4e projects in IntelliJ. Try to run the
AIMADemoAppthroughaima-java/gui/src/main/java/aima.gui/app/AIMADemoApp.java.