【发布时间】:2019-05-01 17:32:54
【问题描述】:
我尝试用 Java 实现 nextcloud api。 我使用了这个 API (https://github.com/a-schild/nextcloud-java-api),它是自我解释的,但我在连接到服务器时遇到了严重的问题。
public static void main(String[] args) {
String serverName = "https://<domain>/nextcloud/";
boolean useHTTPS = true;
int port = 443;
String userName = "test";
String password = "test";
NextcloudConnector nxt = new NextcloudConnector(serverName, useHTTPS, port, userName, password);
nxt.deleteUser("test2");
}
}
我总是遇到这个异常:"Exception in thread "main" org.aarboard.nextcloud.api.exception.NextcloudApiException: java.util.concurrent.ExecutionException: java.net.UnknownHostException: https: unknown error"
【问题讨论】: