Calling Clojure from Groovy Add comment to Wiki View in Wiki Edit Wiki page Printable Version

There are a number of ways to mix Groovy and Clojure. You can access Clojure classes from Groovy and vice versa by pre-compiling.

You can access via Java 6's scripting API: JSR-223 access to other JVM languages

You can also get access to Clojure's classes from Groovy, e.g. (for Groovy 1.7 snapshot):

Or interact via creating a new Process (again for Groovy 1.7 snapshot):

Another option is to use the Clojure API like this:

There is also a Clojure plugin for Grails which provides easy access to execute clojure code from any Grails artifact (controllers, taglibs, services etc...):

Not to be left behind Griffon also sports a clojure plugin, based on the Grails one: Among it's features you'll find: script loading at runtime (like Grails), class generation using clojure's macros and a repl.



Results of your search request can come from various sources: the Groovy website itself, the JIRA issues, the API documentation, as well as a few other interesting Groovy-related blogs.

  By  -  pages  -  views  - last modified