Please post your CLASSPATH, or what after the java -cp
On Thursday, 11 June 2015 10:46:40 UTC+1, SavioL wrote:
>
>
> Hi,
>
> try this code, have you got the same error?
>
> import java.io.IOException;
> import com.orientechnologies.orient.client.remote.OServerAdmin;
> import com.tinkerpop.blueprints.Vertex;
> import com.tinkerpop.blueprints.impls.orient.OrientGraph;
>
>
> public class Test {
>
> private static String remote = "remote:localhost/";
>
> public static void main(String[] args) {
>
> String nomeDb = "Testing";
> String currentPath = remote + nomeDb;
>
> OServerAdmin serverAdmin;
> try {
> serverAdmin = new OServerAdmin(currentPath).connect("root",
> "root");
> if (serverAdmin.existsDatabase()) {
> System.out.println("Db already exist");
>
> } else {
> serverAdmin.createDatabase(nomeDb, "graph", "plocal");
>
> System.out.println("Db creating");
>
> OrientGraph g = new OrientGraph(currentPath);
>
> System.out.println("Db created");
>
> Vertex james = g.addVertex("class:PersonGraph");
>
> james.setProperty("name", "James");
>
> g.commit();
>
> g.shutdown();
> }
> serverAdmin.close();
> } catch (IOException e) {
> e.printStackTrace();
> }
>
> }
>
> }
>
> regards,
> Savio L.
>
--
---
You received this message because you are subscribed to the Google Groups
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.