title: Nashorn alternative for Java 11
body: <p>I am using the Nashorn JavaScript Engine in Java 11 which works fine except it will be deprecated soon. I have tried GraalVM which I find quite worse as it takes 13-14 seconds to execute a simple expression (e.g. 2+3). Is there any other alternative that I could use or should I try GraalVM with some other approach (if there is any)?</p>
  <pre><code>ScriptEngineManager mgr = new ScriptEngineManager();
  ScriptEngine engine = mgr.getEngineByName(&quot;javascript&quot;);
  engine.eval(&quot;2+3&quot;);
  </code></pre>