Bonjour ;

J’ai essayé d’exécuter l’exemple suivant sous jbuilder:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
 
package org.neo4j.example.helloworld;
 
import org.neo4j.graphdb.*;
import org.neo4j.kernel.EmbeddedGraphDatabase;
 
/**
 * Example class that constructs a simple graph with message attributes and then prints them.
 */
public class NeoTest {
 
    public enum MyRelationshipTypes implements RelationshipType {
        KNOWS
    }
 
    public static void main(String[] args) {
        GraphDatabaseService graphDb = new EmbeddedGraphDatabase("var/base");
 
 
        Transaction tx = graphDb.beginTx();
        try {
            Node firstNode = graphDb.createNode();
            Node secondNode = graphDb.createNode();
            Relationship relationship = firstNode.createRelationshipTo(secondNode, MyRelationshipTypes.KNOWS);
 
            firstNode.setProperty("message", "Hello, ");
            secondNode.setProperty("message", "world!");
            relationship.setProperty("message", "brave Neo4j ");
            tx.success();
 
            System.out.print(firstNode.getProperty("message"));
            System.out.print(relationship.getProperty("message"));
            System.out.print(secondNode.getProperty("message"));
        }
        finally {
            tx.finish();
            graphDb.shutdown();
        }
    }
}
lien du ce code
http://wiki.neo4j.org/content/One_Mi..._Complete_Code

Mais il y’a toujours un problème avec les packages (.jar) malgré que j’ai téléchargé et j’ai intégré ces derniers

Quelqu'un saurait-il m'indiquer comment faire ?

Merci d'avance pour votre aide.