cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

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