Java tutorial
import javax.script.ScriptContext; import javax.script.SimpleScriptContext; public class Main { public static void main(String[] args) throws Exception { ScriptContext ctx = new SimpleScriptContext(); ctx.setAttribute("year", 2015, ScriptContext.ENGINE_SCOPE); ctx.setAttribute("month", 9, ScriptContext.ENGINE_SCOPE); ctx.setAttribute("day", 21, ScriptContext.ENGINE_SCOPE); } }