title: Using a class not in current directory in a Groovy script
body: <p>MyClass.groovy has</p>
  
  <pre><code>def static a(){ ... }
  </code></pre>
  
  <p>MyScript.groovy uses MyClass like:</p>
  
  <pre><code>x = MyClass.a()
  </code></pre>
  
  <p>This works fine if MyClass.groovy is in the same directory as MyScript.groovy. If I put MyClass.groovy in ~/.groovy/lib or another directory that is part of CLASSPATH it does not work. Is there another way to tell Groovy where to find MyClass.groovy if it is not in the current directory?</p>