title: Load groovy classes/scripts dynamically without compilation?
body: <p>I have a set of groovy scripts in package hierarchy. I have 1 main script, from which I want to call others. For example I have these scripts (with public classes/interfaces of the same name in them):</p>
  
  <pre><code>package.MainScript
  package.MyInterface;
  
  package.utils.MyInterfaceImpl1 //implements MyInterface
  package.utils.MyInterfaceImpl2 //implements MyInterface
  </code></pre>
  
  <p>Is there a way to call one script from the other <strong>without knowing called class name at compile time</strong>? I mean to do something like dynamic class loading  like:</p>
  
  <pre><code>class MainScript {
    public static void main (String[] args) {
        MyInterface instance = Class.forName("package.utils.Util1");
    }
  }
  </code></pre>