Thank you Sundar, I'll give it a try.
Will post findings here and JRuby group.

> Message: 3
> Date: Mon, 27 Jan 2014 09:31:43 +0530
> From: "A. Sundararajan" <[email protected]>
> Subject: Re: Calling from JRuby
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Hi James,
> 
> You can use jsr223 API to create nashorn engine from JRuby and evaluate 
> JavaScript. You can expose Java objects as global variables to script 
> (via javax.script.ScriptContext). It is also possible to implement Java 
> interfaces and extend Java classes in JavaScript. Objects of such 
> implementations can be passed around to JDK core classes as well as 
> JRuby classes.
> 
> You can access properties of JavaScript objects via 
> jdk.nashorn.api.scripting.ScriptObjectMirror.
> You may want to refer to 
> https://wiki.openjdk.java.net/display/Nashorn/Nashorn+jsr223+engine+notes
> 
> -Sundar

                                          

Reply via email to