cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Expect disruption to service on Thursday, Feb. 9!

Embedded Neo4j in Java project with APOC and Graph Data Science. Is it possible?

depire
Node Clone

Dear friends,

I need to know if at least one already works with embedded Neo4j in Java with APOC and GDS. If yes, could you copy/paste your code here to show how to integrate both extensions ?

My code is
String home = System.getProperty("user.home");
File databaseDirectory = new File(home+"/Downloads/NEO4J");
String DEFAULT_DATABASE_NAME = "neo4j";

		DatabaseManagementService managementService = new DatabaseManagementServiceBuilder(databaseDirectory.toPath())
				.build();
		
		embeddedDb = managementService.database( DEFAULT_DATABASE_NAME );
		// http://blog.vorona.ca/how-to-use-neo4j-plugins-in-an-embedded-db.html

		GraphDatabaseAPI graphDatabase = (GraphDatabaseAPI) managementService.database( DEFAULT_DATABASE_NAME );
		
		GlobalProcedures globalProcedures = graphDatabase.getDependencyResolver().resolveDependency(GlobalProcedures.class, SelectionStrategy.FIRST);
		
		try {
			globalProcedures.registerProcedure(, true);
		} catch (KernelException e) {
			e.printStackTrace();
		}

Best regards,
Alexandre

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online