How can i connect to mongoDB server running on a windows server?

hi .
i have a windows vps server with mongoDB installed and a admin user and some Database with collections created.
the problem is i can not connect to the database at all !
no matter compass , shell or java code , i can not connect to remote server .
this is my java code :
final String uriString = “mongodb://<What should i put here ? >:27017/”;

    try (MongoClient mongoClient = MongoClients.create(uriString);) {
        some crud operations ....
    }

i used hostname and ip address but it doesnt worked
can anyone help me plz ?

final String uriString = “mongodb://<What should i put here ? >:27017/”;

mongodb://some_uid:some_password@your_server:27017