Connection Fail on Mongo Atlas Serverless

Java verion is:
openjdk version “11.0.2” 2019-01-15

OpenJDK Runtime Environment 18.9 (build 11.0.2+9)

OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

Is there any alternative to solve this? I really need to connect to atlas and it is being very problematic for java