
def function(a){
    a*2
}
//evaluate (new File("calc.groovy"))
//evaluate (new File("cls.groovy"))

println "--------------"

lib.load "calc"
cls = lib.load "cls"


//This is how to load a new class dinamically
//  ClassLoader parent = lib.class.getClassLoader();
//  groovy.lang.GroovyClassLoader loader = new groovy.lang.GroovyClassLoader(parent);
//  Class cls = loader.parseClass(new File("script\\cls.groovy"));

    
println dev.get()
println dev2.val
println calc(6)


//cls = Class.forName('cls')
//obj = new cls()
obj = cls.newInstance()
println obj.val
obj.exec()


