title: Connecting to remote neo4j using Java API
body: <p>I'm writing a test app that makes use of neo4j. I've been trying to follow a few tutorials, reading online, and also checking the documentation, and the most common way of making use of the Java API made available is to use an embedded neo4j.</p>
  
  <p>Now, for multiple reasons this will not work for me. (Eg. server on different machine, etc.)</p>
  
  <p>I'm using :</p>
  
  <pre><code>"org.neo4j" % "neo4j" % "2.1.5",
  "org.neo4j" % "neo4j-rest-graphdb" % "2.0.1",
  </code></pre>
  
  <p>And connecting to neo4j this way :</p>
  
  <pre><code>GraphDatabaseService gds = new RestGraphDatabase("http://neo4jserver_address:7474/db/data");
  </code></pre>
  
  <p>As anwsered before on another SO post, the <code>RestGraphDatabase</code> is not a complete implementation of <code>GraphDatabaseService</code> , which leads to all sorts of trouble when trying to use , for example, other libs such as :</p>
  
  <pre><code>"com.graphaware.neo4j" % "timetree" % "2.1.5.25.18",
  </code></pre>
  
  <p>Also, the fact that <code>RestGraphDatabase</code> doesn't allow usage of <code>GlobalGraphOperations</code> because of that same problem.</p>
  
  <p>I've tried seaching the official documentation I've found and again, the examples given are for embedded DB. </p>
  
  <p>My question is if anyone knows of the correct way to connect to a remote neo4j server the right way and where in the documentation I can read about this bit?</p>
  
  <p>Also, no I'm not using neo4j HA , although I have a 1 year testing license.</p>
  
  <p>PS - connection over REST is not required. Protocol is irrelevant, what the question is is how to connect to a remote neo4j server (over whatever protocol) using the API and ending up with a proper, full implementation of <code>GraphDatabaseService</code></p>