[prev in list] [next in list] [prev in thread] [next in thread] 

List:       groovy-user
Subject:    RE: [groovy-user] Newbie question
From:       "Venkat Subramaniam" <venkats () agiledeveloper ! com>
Date:       2007-11-30 14:31:08
Message-ID: 002e01c8335d$a6565530$f302ff90$ () com
[Download RAW message or body]

There are three options I can think of:

1. If the script contains a class, no need to do anything. Simply make sure
the script file is
in your classpath (or include that in classpath when you run groovy). You
can use the class
like you use other classes.

2. If you want to run the script, you can use the evaluate() method of
GroovyShell. You can pass
your current binding or create other bindings to pass parameters, etc.

3. You can read the script file into a string and manipulate it, concatenate
it, etc. and then as
GroovyShell to run it as well.

Venkat

-----Original Message-----
From: lquerel [mailto:laurent.querel@gmail.com] 
Sent: Friday, November 30, 2007 7:20 AM
To: user@groovy.codehaus.org
Subject: [groovy-user] Newbie question


Hi all,

I would like to use Groovy as a script language. What is the best solution
to include a subscript in another script ? 

Thanks,

Laurent

-- 
View this message in context:
http://www.nabble.com/Newbie-question-tf4912635.html#a14063836
Sent from the groovy - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic