public static void putJavaVariablesIntoEngine(final ScriptEngine engine,final Map<String,Object> variables){
  final Bindings bindings=new SimpleBindings();
  for (  String key : variables.keySet()) {
    bindings.put(key,variables.get(key));
  }
  engine.setBindings(bindings,ScriptContext.ENGINE_SCOPE);
}

public static void putJavaVariablesIntoEngine ( final ScriptEngine engine , final Map < String , Object > variables ) { final Bindings bindings = new SimpleBindings ( ) ; for ( String key : variables . keySet ( ) ) { bindings . put ( key , variables . get ( key ) ) ; } engine . setBindings ( bindings , ScriptContext . ENGINE_SCOPE ) ; }
puts a the given map of variables into the engine .
