title: okhttp NoClassDefFoundError when running project
body: <p>I've created the build.gradle file which looks like this:</p>
  
  <pre><code>plugins {
      id 'java'
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile 'com.squareup.okhttp3:okhttp:3.12.1'
  }
  </code></pre>
  
  <p>then I have a simple helloWorld class which uses the sample code from the okhttp website:</p>
  
  <pre><code>import okhttp3.OkHttpClient;
  import okhttp3.Request;
  import okhttp3.Response;
  
  public class helloWorld{
      public static void main(String[] args){
          System.out.println("Hello World!");
          OkHttpClient client = new OkHttpClient();
  
          Request request = new Request.Builder()
          .url("www.google.com")
          .build();
  
          try (Response response = client.newCall(request).execute()) {
              System.out.println("SUCCESSS----&gt;"+response.body().string());
          } catch (IOException e){
              System.out.println("......error thrown");
          }
      }
  }
  </code></pre>
  
  <p>When I try to run the compiled class file I get the following error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: okhttp3/OkHttpClient at helloWorld.main(helloWorld.java:6)
  Caused by: java.lang.ClassNotFoundException: okhttp3.OkHttpClient at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
      at java.base/jdk.internal.loader. 
  ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 1 more
  </code></pre>
  
  <p>If I remove the lines</p>
  
  <pre><code>OkHttpClient client = new OkHttpClient(); 
  Request request = new Request.Builder()
      .url("www.google.com")
      .build();
  
      try (Response response = client.newCall(request).execute()) {
          System.out.println("SUCCESSS----&gt;"+response.body().string());
      } catch (IOException e){
          System.out.println("......error thrown");
      }
  </code></pre>
  
  <p>then the class runs correctly. So I think that maybe the jar isn't being imported correctly?</p>
  
  <p>To be clear, the project is being compiled correctly, the issue only occurs if I try to run the compiled class file.</p>