How do I access Ruby classes within a JAR built using Warbler from Java?

109 Views Asked by At

The method names in the compiled classes are weird and can not be used or called directly from Java. And as there are dependencies among Ruby files with modules and libraries, I'm not able to invoke methods on those classes directly using ScriptingEngine. Any suggestion?

1

There are 1 best solutions below

0
On

This question gets to the root of the problem that you are experiencing with all of your other questions. JRuby and Warbler do not produce classes that you can just drop into a Java application. Ruby objects have a runtime library and all these other things that are needed. Ultimately, you need to start a Ruby runtime, and that's what the JRuby Embed API is all about.