title: Java org.apache.http.ssl.SSLContext not found
body: <p>I am trying to build a HttpClient but can't just figure out how to resolve this ClassNotFound-Error. I installed &quot;org.apache.httpcomponents:httpclient:4.1.3&quot; with maven and several other libraries but yet i won't work.</p>
  <p>Code:</p>
  <pre><code>import org.apache.http.HttpEntity;
  import org.apache.http.HttpResponse;
  import org.apache.http.client.HttpClient;
  import org.apache.http.client.config.CookieSpecs;
  import org.apache.http.client.config.RequestConfig;
  import org.apache.http.client.methods.HttpGet;
  import org.apache.http.client.methods.HttpPost;
  import org.apache.http.client.utils.URIBuilder;
  import org.apache.http.entity.StringEntity;
  import org.apache.http.impl.client.HttpClients;
  import org.apache.http.util.EntityUtils;
  import org.json.JSONArray;
  import org.json.JSONObject;
  
  import java.io.*;
  import java.net.URISyntaxException;
  import java.util.*;
  
  public class Test {
      public static void main(String[] args) {
          String bearerToken = &quot;BLABLA&quot;;
          HttpClient httpClient = HttpClients.custom().setDefaultRequestConfig(RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD).build()).build();
      }
  }
  </code></pre>
  <p>The corresponding error message:</p>
  <pre><code>Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
  Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/apache/http/ssl/SSLContexts
      at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:977)
      at Twitter.main(Twitter.java:23)
  Caused by: java.lang.ClassNotFoundException: org.apache.http.ssl.SSLContexts
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
  </code></pre>
  <p>The maven repos i have installed currently:</p>
  <pre><code>oauth.signpost:signpost-commonshttp4:2.0.0
  org.json:json:20200518
  org.apache.httpcomponents:httpclient:4.1.3
  
  </code></pre>
  <p>Please note, that i am new to Java and Intellij-IDE.</p>
  <p>I appreciate your help.</p>