Hi ManKeer,
The APIs of the Web and Java client libraries are very similar, so there should be no substantial differences in the connect operations between the two client applications.
Some preliminary checks that you could make are:
- make sure that the license running on the server correctly enable both client libraries, this can be verified in the server log in the initialization phases or in the "License" tab of the monitoring dashboard;
- if the server is behind a load balancer and you are using a Java client library below version 4.3.0 the default value for
setEarlyWSOpenEnabled is different from the JavaScript lib; setting it to false could be critical in some scenarios.
If you are still having problems we will need some more information and also logs.
You should check that while the Java client is trying to connect the server log is not logging anything at all, and in this case enable client-side logging.
Regards,
Giuseppe