Search code examples
javascriptingjrubyjruby-java-interop

JRuby and Java objects


Please tell me if it is possible to do the following:

  • create an instance of a specific class in Java
  • pass it to JRuby to do something with it
  • continue using the "modified" version in Java

May you provide a small working example?

EDIT: It turns out that embedding was the simplest way to achieve this. More information is available on Embedding JRuby.


Solution

  • This was the solution I used : Direct JRuby embedding