title: When running Groovy scripts using the groovy-all jar, how do you specify a classpath?
body: <p>I've found an example for running Groovy scripts on systems that do not have Groovy installed using the groovy-all jar file. I attempted the following:</p>
  
  <pre><code>java -cp src:.:lib/* -jar lib/groovy-all-2.0.1.jar src/com/example/MyScript.groovy
  </code></pre>
  
  <p>The trouble is my script depends on jars in the lib directory plus two other Groovy script files located in src/com/examples. When I run this, it complains about the import statements for all of them. I can run it on a system that has Groovy installed fine by using the following:</p>
  
  <pre><code>CLASSPATH="src:.:lib/*" groovy src/com/example/MyScript.groovy 
  </code></pre>
  
  <p>How do I run Groovy scripts this way, using the groovy-all jar, as well as give it a classpath?</p>