Neo4j - Java Environment Setup



In this chapter, we will discuss how to setup a Java Project in Eclipse IDE to work with Neo4j API to develop Java applications.

We are going to use this Eclipse IDE Project setup to develop Neo4j Java API applications in next chapters

Step 1 - Access neo4j download page

http://www.neo4j.org/download

Here we can see "Download Neo4j Server" and just below that one we can see "Other Versions" link

Neo4j CQL Tutorial

Step 2 - Click on "Other Versions" link

Neo4j CQL Tutorial

Step 3 - Click on "Binary: zip"

Download Neo4j Binaries into your system as zip file.

Neo4j CQL Tutorial

Step 4 - Extract this zip file into your required file system path

Now NEO4J_HOME folder looks like as shown below:

Neo4j CQL Tutorial

Step 5 - Open "lib" folder to observe all Neo4j binaries.

Neo4j CQL Tutorial

Step 6 - Open Eclipse and create a Java Project

Neo4j CQL Tutorial

Step 7 - Create a User Library to add Neo4j Libraries to our Java project

Select our project Build Path. Go to "" Tab. Click on "Add Library.." button as show below

Neo4j CQL Tutorial

Select "User Library" and click on "Next" button

Neo4j CQL Tutorial

Click on "User Libraries.." button

Neo4j CQL Tutorial

Click on "New" button

Neo4j CQL Tutorial

Provide User Library name : "NEO4J_JAVA_LIB" and click on "OK" button

Neo4j CQL Tutorial

Now we can see newly created "User Library". Click on "Add External JARs.." button to add our Neo4j jars

Neo4j CQL Tutorial

Step 7 - Go to Neo4j Libraries folder, select all jar files and click on "Ok" button

Neo4j CQL Tutorial

Now we can observe that all Neo4j Jars are added to our new User Library.

Neo4j CQL Tutorial

Click on "Ok" then "Finish". Observe our newly created user library is added to our Java Project Build Path

Neo4j CQL Tutorial

Click on "Ok" button. Now observe new "NEO4J_JAVA_LIB" library is added to our Java project as shown below

Neo4j CQL Tutorial

Now our Neo4j Java Project setup is done. We are ready to write Neo4j JAVA API applications in Eclipse IDE.

We will provide one example for each Neo4j JAVA API in next chapters

Advertisements