Java scripting support

A while back, discussing things to drop in JRuby 1.7.0, Yoko and
Charles mentioned possibly dropping BSF support. Has its functionality
been (or will it be) taken over by JSR 223 support? Or is there
another kind of scripting language embedding for Java that I don’t
know about?

I’m pondering migrating some BSF code to whatever the new thing is.

On 2012-03-24, at 00:04, Eric C. wrote:

A while back, discussing things to drop in JRuby 1.7.0, Yoko and
Charles mentioned possibly dropping BSF support. Has its functionality
been (or will it be) taken over by JSR 223 support? Or is there
another kind of scripting language embedding for Java that I don’t
know about?

I’m pondering migrating some BSF code to whatever the new thing is.

I think the proposal was to move BSF support to a gem. You could still
use it, but you would have to install and use the gem. I have not seen
any work done on this, however, so it may not happen for a while.

The same may happen to JSR 223 support.

Another old API is the “JRuby Core” api, which may be abandoned over
time.

Your best choice for embedding JRuby is “RedBridge” aka “JRuby Embed”.
The main class is the ScriptingContainer. It is great! The only
disadvantage it has vs. BSF and JSR 223 is that it is JRuby specific.

http://jruby.org/apidocs/org/jruby/embed/ScriptingContainer.html


Uwe K.
[email protected]

I have worked a bit with the ScriptingContainer approach and can vouch
that
it is pretty great

2012/3/26 Uwe K. [email protected]

On Mon, Mar 26, 2012 at 2:44 AM, Uwe K. [email protected] wrote:


Uwe K.
[email protected]
http://kubosch.no/

Thanks for that pointer; I was only dimly aware of RedBridge. It
appears that RedBridge offers BSF and JSR 223 interfaces to itself.

I’ve done some playing around with JSR 223 over the weekend. I see
that RedBridge has a way to ask for 1.9 support; does the JSR 223
implementation independent of RedBridge have that ability? (Or am I
mistaken – is the only 223 implementation the one on top of
RedBridge?)

On 2012-03-26, at 20:33, Eric C. wrote:

Your best choice for embedding JRuby is “RedBridge” aka “JRuby Embed”. The main
class is the ScriptingContainer. It is great! The only disadvantage it has vs.
BSF and JSR 223 is that it is JRuby specific.

http://jruby.org/apidocs/org/jruby/embed/ScriptingContainer.html

Thanks for that pointer; I was only dimly aware of RedBridge. It
appears that RedBridge offers BSF and JSR 223 interfaces to itself.

I’ve done some playing around with JSR 223 over the weekend. I see
that RedBridge has a way to ask for 1.9 support; does the JSR 223
implementation independent of RedBridge have that ability? (Or am I
mistaken – is the only 223 implementation the one on top of
RedBridge?)

All ways of using JRuby embedded will honor the “jruby.compat.version”
Java system property. As of JRuby 1.7.0, Ruby 1.9 compatibility is the
default anyway.


Uwe K.
[email protected]