Embedding ruby questions

Hello all.

When researching embedding jruby into a java app, I learn from


that “using jruby embed is the approved way” to embed.

Am I to assume that if I need to do more than variable sharing, I’ll
still need to use the “legacy API’s?”

Am I assume that RedBridge/jruby embed “provides” jruby’s canonical
JSR223 implementation? Is that right?

Also, on this page:

it says that the JavaEmbedUtils are “meant to be long lasting” but I
thought they were “legacy.” Does that mean they “were once meant to be
long last” but have been supereceded by “jruby embed?”

Also I’ve noticed in
“Using a Ruby subclass by casting it to its Java superclass – from
Java!”
that somehow calling toJava on a ruby object that inherits from java
gives a working java class. How does jruby do that? Does it emit
bytecode to create a new class that inherits from the parent or use a
dynamic proxy and “intercept” method calls?

Thanks!
-roger-

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs