About running .class files generated by JRuby
问题 Have a Ruby script, print "HELLO" If you use jrubyc script.rb You get a .class file. How do I execute this in my Java program? (so that it outputs "HELLO" to the console). I am using JRuby's complete JAR. 回答1: thus you've probably setup "embedded" (if not check-out answers such as this one) JRuby from Java e.g. (JSR 223 might be similar - just use ScriptEngine.eval to run Ruby code) : ScriptingContainer scriptContainer = new ScriptingContainer(LocalContextScope.CONCURRENT); scriptContainer