title: Does Gradle add external dependencies (jars) to the classpath?
body: <p>I'm working on a project for school and I needed the Jackson library to parse json files. I included the library in my gradle script as follows :</p>
  
  <pre><code>...
  dependencies {
      compile 'org.codehaus.jackson:jackson-core-asl:1.9.0'
      compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.0'
      compile 'org.hibernate:hibernate-validator:4.2.0.Final'
      testCompile 'junit:junit:4.9'
  }
  ...
  </code></pre>
  
  <p>I also added my classes folder to classpath.
  the build with gradle is ok, it actually downloads the libraries and all, but when I run my program ( from the cmd line with> java name.of.package.Main ) it says : </p>
  
  <pre><code>&gt; Exception in thread "main" java.lang.NoClassDefFoundError:
  &gt; org/codehaus/jackson/map/JsonMappingException
  &gt;         at java.lang.Class.getDeclaredMethods0(Native Method)
  &gt;         at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
  &gt;         at java.lang.Class.getMethod0(Unknown Source)
  &gt;         at java.lang.Class.getMethod(Unknown Source)
  &gt;         at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)
  &gt;         at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException:
  &gt; org.codehaus.jackson.map.JsonMappingException
  &gt;         at java.net.URLClassLoader$1.run(Unknown Source)
  &gt;         at java.net.URLClassLoader$1.run(Unknown Source)
  &gt;         at java.security.AccessController.doPrivileged(Native Method)
  &gt;         at java.net.URLClassLoader.findClass(Unknown Source)
  &gt;         at java.lang.ClassLoader.loadClass(Unknown Source)
  &gt;         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
  &gt;         at java.lang.ClassLoader.loadClass(Unknown Source)
  &gt;         ... 6 more
  </code></pre>
  
  <p>but I noticed that when I add the same two libraries in the gradle file to classpath, everything is ok .. </p>
  
  <p>can someone tell me if I am supposed to add the libraries manually to the classpath ? what's the use of gradle then in this case .. </p>
  
  <p>thanks a lot!</p>