I was using jdk1.8.0_171 when I faced the same issue. I tried top 2 solutions here (adding a certificate using keytool and another solution which has a hack in it) but they didn't work for me.
I upgraded my JDK to 1.8.0_181 and it worked like a charm.