jastrachan | 16 Apr 19:14 2004
Picon

Re: Calling scripts within scripts


On 16 Apr 2004, at 15:19, Kevin Jones wrote:

> the easiest way of doing this is via a GroovyShell.
>
> shell = new GroovyShell()
> shell.evaluate(new File("foo.groovy"))
> shell.evaluate("for (x in 1..10) { println "hello ${x}" }')
>
> Thanks James, this is just what I needed,

Incidentally there's now a groovier way :)

I just fixed this issue...

http://jira.codehaus.org/secure/ViewIssue.jspa?key=GROOVY-360

which means there's an easier way to evaluate other scripts inside a 
script

evaluate(new File("foo.groovy"))

e.g.

http://tinyurl.com/26ppf

James
-------
http://radio.weblogs.com/0112098/

Gmane