Cannot load JRubyEngine because org.apache.bsf.util.BSFEngineImpl not found
- by Ceilingfish
Hi,
I'm trying to use JRuby in a custom application, and I don't seem to be able to load the JRubyEngine object. My class looks like functionally similar to this:
public class ScriptEngine {
private static ScriptEngine engine = new JRubyEngine();
public void run(final String script, final Map<String,Object> input) {
final Bindings context = engine.createBindings();
context.putAll(input);
try {
engine.eval(script,context);
} catch (ScriptException e) {
log.error("Failed to execute script: "+getScript(),e);
}
}
}
However this fails at compilation with the complaint:
[javac] Compiling 486 source files to /workspace/myProject/build/src
[javac] /workspace/myProject/src/net/ceilingfish/ScriptEngine.java:31: cannot access org.apache.bsf.util.BSFEngineImpl
[javac] class file for org.apache.bsf.util.BSFEngineImpl not found
[javac] private static ScriptEngine engine = new JRubyEngine();
[javac] ^
[javac] 1 error
Does anyone have any insights on where I can get this class from? Or if there is a better way to be instantiating a JRubyEngine object.