Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 列出远程OrientDB服务器上的数据库_Java_Database_Orientdb - Fatal编程技术网

Java 列出远程OrientDB服务器上的数据库

Java 列出远程OrientDB服务器上的数据库,java,database,orientdb,Java,Database,Orientdb,是否有方法连接到远程OrientDB服务器并列出可用的数据库?我想要的是使用Java列出数据库。类似于这里使用的命令行:-连接到服务器实例 存档此文件的最低代码是什么 谢谢 OServerAdmin是管理OrientDB的远程服务器实例的类。 使用URL创建一个实例,连接ODB安装中的orientdb-server-config.xml中的根凭据,然后调用listDatabases API获取数据库列表 OServerAdmin是管理OrientDB的远程服务器实例的类。 使用URL创建一个实例

是否有方法连接到远程OrientDB服务器并列出可用的数据库?我想要的是使用Java列出数据库。类似于这里使用的命令行:-连接到服务器实例 存档此文件的最低代码是什么

谢谢

OServerAdmin是管理OrientDB的远程服务器实例的类。 使用URL创建一个实例,连接ODB安装中的orientdb-server-config.xml中的根凭据,然后调用listDatabases API获取数据库列表

OServerAdmin是管理OrientDB的远程服务器实例的类。 使用URL创建一个实例,连接ODB安装中orientdb-server-config.xml中的根凭据,然后调用listDatabases API以获取数据库列表。

假设根密码为root,如下所示:

OServerAdmin server = new OServerAdmin("remote:localhost").connect("root", "root");
Set<String> dbsNames = server.listDatabases().keySet();
假设root密码是root,类似这样:

OServerAdmin server = new OServerAdmin("remote:localhost").connect("root", "root");
Set<String> dbsNames = server.listDatabases().keySet();