neo4j/neo4j-java-driver

Name: neo4j-java-driver

Owner: Neo4j

Description: Neo4j Bolt driver for Java

Created: 2015-04-15 17:08:15.0

Updated: 2018-01-16 21:16:28.0

Pushed: 2018-01-17 12:57:32.0

Homepage:

Size: 5130

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Neo4j Java Driver

This is the first official Neo4j java driver for connecting to Neo4j-the-database via the newly designed remoting protocol BOLT.

For detailed information such as manual, driver API documentations, changelogs, please refer to wiki.

Java version

Starting from 1.5 driver requires Java 8 for building and at runtime. Please use 1.4 series when Java 7 is required.

Minimum viable snippet

Add the driver to your project:

<dependencies>
    <dependency>
        <groupId>org.neo4j.driver</groupId>
        <artifactId>neo4j-java-driver</artifactId>
        <version>x.y.z</version>
    </dependency>
</dependencies>

*Please check the Releases for the newest driver version available.

Connect to a Neo4j 3.0.0+ database:

Driver driver = GraphDatabase.driver( "bolt://localhost:7687", AuthTokens.basic( "neo4j", "neo4j" ) );

try ( Session session = driver.session() )
{
    StatementResult rs = session.run( "CREATE (n) RETURN n" );
}

driver.close();
Building

The source code here reflects the current development status of a new driver version. If you want to use the driver in your products, please use the released driver via maven central or check out the code with git tags instead.

Running tests and creating a package

The driver unit tests relies on latest boltkit installed on your local machine. If boltkit is not installed, then all tests that requires boltkit will be ignored and not be executed.

Then execute the following Maven command:

mvn clean install
Windows

If you are building on windows, you need to run install as admin, so that Neo4j-the-database could be installed and started for integration tests.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.