Hello Nashorn

suggest change
// Obtain an instance of JavaScript engine
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("nashorn");

// Execute an hardcoded script
try {
    engine.eval("print('Hello Nashorn!');");
} catch (ScriptException ex) {
    // This is the generic Exception subclass for the Scripting API

// Outcome:
// 'Hello Nashorn!' printed on standard output

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents