-
Notifications
You must be signed in to change notification settings - Fork 160
Eclipse Setup Tips
#Eclipse Development Environment Setup
Below you'll find a step by step procedure for setting up your development environment in Eclipse (recommended). The reason this is recommended is because it is known by this author that by using the PyDev
(Python Plugin: in Eclipse click "help > Eclipse Marketplace" in the search field type PyDev or Python)
plugin, you can run both the Python version of NuPIC and the Java version side by side! (This text was written during the "porting phase" of htm.java which is occurring rapidly and may not apply by the time you read this.)
If you have Eclipse already setup, you can skip step 1 and 2.
1.) Download Eclipse - link can be found here
2.) Setup your workspace - Eclipse's concept for a container directory that contains project information relevant to the work you're doing. Give your workspace a name.
3.) Install Gradle - Nothing to do with Eclipse (yet). This is a system install and you will end up installing both Gradle as a separate tool and the Gradle plugin, information can be found here . Confirm that Gradle is installed correctly by going to your "terminal" or command line and typing "gradle check" from just inside the htm.java directory. You should see the the project build and tests run and finish with a "success" message.
4.) Open Eclipse in your newly created workspace, and install the Gradle plugin. Click on the top menu bar "Help > Eclipse Marketplace". In the search field type Gradle, and hit <enter>
. Follow the directions (install everything).
5.) Import your project as a Git Project. From the top menu in Eclipse, choose "File > Import...", then choose "Git > Projects from Git" ... hit next.
...then choose "Existing local repository"
... it should look like the following (after clicking "Add" and locating your htm.java clone directory)
... Import existing projects should already be selected. If not, select it and click "Finish"
6.) Now setup your build path. Right-click on your project root in the "Package Explorer" tab and choose "Properties" at the bottom of the menu. On the next dialog, click "Java Build Path" and then add two source directories (from the "Source" tab) to your path by clicking "Add Folder..." twice and selecting a.) src/main/java, and b.) src/test/java as shown below:
... Add the libs/jars to the path. Right click on your project root and at the bottom of the menu click "Properties" again. From the "Libraries" tab, click on "Add JARs" - navigate to "libs" and select all the jars (hold down the key and select each and every jar). as seen below:
This will allow you to build the project! :-)
To get the tests to run, from the top menu bar, click on the tiny black down-arrow to the right of the round green button with the right-facing white arrow. This is your "Run" button used to launch any Java executables. You can set up run configurations from here, but usually if you have a test class or any Java file with a "public static void main(String[] args) method in it, you can just right-click anywhere in the file or right-click the file in the "Package Explorer" and click "Run As" > "Application" or "JUnit test".
As always, your mileage may vary depending on exact setups, but this should help 90% of developer environments to get configured correctly!
Happy Hacking! :-)
- Introduction (Home)
- History & News Archives...
- Usability
- Architecture
- NAPI Quick Start Guide
- NAPI In Depth
- Saving Your Network: PersistenceAPI Serialization
- Roadmap
- Browse Java Docs
- Build Instructions
- Eclipse (Dev Setup)
- Anomaly Prediction
- Test Coverage Reports
- [Cortical.io Demos] (https://github.com/numenta/htm.java-examples/tree/master/src/main/java/org/numenta/nupic/examples/cortical_io)
- Hot Gym Demo
- Performance Benchmarks with jmh - blog
- BLOG: Join the "cogmission"