i'm working on webserver project tomact. have database in neo4j. how can link database? want information there , add new data, in servlets created. tried running database in background still "forbidden (403) - forbidden" in project. have set somehow? i'm using eclipse, how can that?
you can try approach:
import org.neo4j.graphdb.graphdatabaseservice; import org.neo4j.graphdb.node; import org.neo4j.graphdb.transaction; import org.neo4j.graphdb.factory.graphdatabasefactory; // ... public static void main(string[] args) { graphdatabasefactory graphdbfactory = new graphdatabasefactory(); graphdatabaseservice graphdb = graphdbfactory.newembeddeddatabase("path_to_neo4j_database/your_database_folder"); try (transaction tx = graphdb.begintx()) { // use graphdb object manipulate db content tx.success(); } graphdb.shutdown(); system.out.println("done :) "); } // ...
and don't forget add neo4j library build path:
Comments
Post a Comment