Java Client: failing to connect remotely

I have a working Python script using Python ES plugin which connects to ES index located on the remote server, connection part of it looks like this:

es = Elasticsearch([{

Connection specifications are listed [here][1]

However, I am failing to implement this in Java.

So far I tried:

client = new TransportClient()
                    .addTransportAddress(new InetSocketTransportAddress("", 9300));

other URLs I tried:

and with port 80

all result in java.nio.channels.UnresolvedAddressException

The error you have received is raised when an attempt is made to invoke a network operation upon an unresolved socket address. Which means that the address you are giving is not correct.

Is the following address your cluster address?

Well the question can be closed - I just learned that the owner of the service only allows connections through http, which he secured, because otherwise he can't control who is connected, and Java client doesn't have an option connecting through http and uses a different protocol, so it cannot be used...

Well, if you don't have access, no matter what the options the Java provides, you'll not be able to access.