Accessing Neo4j from Scala

Scala is a general purpose language, which is being increasingly used for high-performance applications, as it has been implemented over JVM, which makes interoperability easier with the existing Java libraries.

In this recipe, we will learn how to access the Neo4j graph database using Scala.

How to do it...

There are multiple solutions for this problem, although there is no standard module that can be considered as the de facto standard with Scala. The solution is listed in the following steps:

  1. Java JAR files works with Scala due to interoperability, so the first way is to import Neo4j JAR files, which can be found under the lib directory, under the Scala project.
  2. There are many REST clients available in Scala, such as ...

Get Neo4j Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.