In my previous post, I showed how the parameters to a JavaScript function can be supplied with Java. The next step is to supply other variables. The simplest way to set some variable values is to use ScriptEngine.put(name, value): ScriptEngine engine = …; engine.put(“taxRate”, 0.0825); // 8.25% // evaluate script // invoke function Now the [...]