Jira Server Rest API Basic Authentication

Hello, I am a Java developers and we use JIRA server version 8.4. I am trying to write a simple Java program that need to communicate with JIRA Rest APIs to create and updates list. I have used this example: JIRA REST API Integration | Baeldung, to for Basic Authentication and getting javax.net.ssl.SSLHandshakeException error.
Is Basic authentication deprecated in JIRA Server ?

Is there anything that I am missing or need to do differently?