JSR-223 access to other JVM languages Add comment to Wiki View in Wiki Edit Wiki page Printable Version

JSR-223 is designed to allow Java access to many scripting languages. This means that it also provides hooks for Groovy to those other languages.

JSR-223 comes with Java 6. Here is how you can use it. First we define a script manager:

Now, we can call out to JavaScript:

Or JRuby:

Or Jython:

Or Clojure:

Or Jaskell:

The output from running these scripts is:

javascript: 24.0
jruby: 24
jython: 24
clojure: 24
jaskell: 24

See also: Accessing Groovy from Java via JSR-223



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