Hello everybody!
I have written a JavaFX-Program to support my scientific work, it deals with analysing network relationships between genes and epigenetic regulators, so a graph database is a logical solution for data storage. I started out with Neo4j 2.x and used the GraphDatabaseFactory interface to start my database out of the Java program.
Since the new iteration of Neo4j came out, I am successively switching over my database accesses to the Bolt protocol, because this seems to be the new convention. The work with the database itself is no problem, the driver works fine, yet I did not manage to start the DB from the Java environment, so I have to run it from the terminal with the 'neo4j start' command.
How would I go about starting and stopping it from Java code? I have looked into ShellServer implementations, but that does not seem to be what I need.
EDIT For the sake of clarity: I want to start the Database from Java, like I did before with
GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(new File(FilePaths.DATABASE_PATH)).newGraphDatabase();
But then I want to pass it to the Driver to interact with it via Bolt, like i do now with the manually started database with
Driver driver = GraphDatabase.driver("bolt://localhost");
So, in pseudocode (I know it does not work that way), something like this would be nice:
Driver driver = GraphDatabase.driver(graphDb);
Thanks for reading, I am looking forward to suggestions!