title: Import Java library groovy
body: <p>i want to use a method defined in the apache.common.net library in my groovy-Script.</p>
  
  <p>I first downloaded and included it in my config:</p>
  
  <pre><code>            this.class.classLoader.rootLoader.addURL(new URL("file:///${currentDir}/lib/commons-net-3.3.jar"))
  </code></pre>
  
  <p>Afterwards i try to use it in my groovy-script like this (to make it clear: the import pimpim.* imports also the classLoader above):</p>
  
  <pre><code>    import pimpim.*
  
  import org.apache.commons.net.ftp.*
  
  def pm = PM.getInstance("test")
  
  
  public class FileUploadDemo {
    public static void main(String[] args) {
      FTPClient client = new FTPClient();
  </code></pre>
  
  <p>I also tried several annotations for the "import" like </p>
  
  <pre><code>import org.apache.commons.net.ftp.FTPClient
  </code></pre>
  
  <p>But i keep getting this error:</p>
  
  <pre><code>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  Y:\pimconsole\scripts\ftp.gy: 11: unable to resolve class FTPClient
   @ line 11, column 15.
         FTPClient client = new FTPClient();
  </code></pre>
  
  <p>What did i miss? Sorry, i am still new to groovy :/</p>