// ensure that output and error streams are re-directed correctly
interp.setOut(System.out);
interp.setErr(System.err);
// register the mgr with object name "bsf"
interp.set ("bsf", new BSFFunctions (mgr, this));
// Declare all declared beans to the interpreter
int size = declaredBeans.size ();
for (int i = 0; i < size; i++) {
declareBean ((BSFDeclaredBean) declaredBeans.elementAt (i));