2

I tried to implement the nextcloud api in Java. I used this API (https://github.com/a-schild/nextcloud-java-api) and it's self explained but i have serious Problems in Connecting to the Server.

    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");



    }
    }

I'm always getting this Exception : "Exception in thread "main" org.aarboard.nextcloud.api.exception.NextcloudApiException: java.util.concurrent.ExecutionException: java.net.UnknownHostException: https: unknown error"

Jonas
  • 121,568
  • 97
  • 310
  • 388
C0nvert500
  • 41
  • 4

1 Answers1

3

Try without protocol in the serverName:

String serverName = "<domain>/nextcloud/";
Lajy
  • 31
  • 3