Runnning JRuby from Java code w\o ScriptEngineManager

How can I run JRuby from Java; but WITHOUT going through
javax.script.ScriptEngineManager?
I would like to call JRuby main function or similar. For example:
jruby.[FooMainClass].eval(new BufferedReader(new
FileReader(“myrubyfile.rb”)));

thanks!

(BTW, example WITH ScriptEngineManager:
Java Scripting and JRuby Example)

Roy -

There may be other ways to create and use a Scripting Container, but I
don’t think it’s possible to run JRuby code without one. The Java
interpreter just doesn’t know Ruby.

On the other hand, you could write Java code that would isolate that
complexity somewhere so that the call from Java would look and feel more
natural.

  • Keith

Keith R. Bennett