BSFManager manager = new BSFManager(); BSFEngine engine = manager.loadScriptingEngine(language); manager.exec(language, "service script for '" + name + "'", 0, 0, scriptStr); Object result = engine.call(null, methodName, argValues); return result;