18. Nashorn and Scripting

Josh Juneau1

(1)Hinckley, Illinois, USA

In Java 6, the javax.script package was included for incorporating scripting languages with Java. It enabled developers to embed code written in scripting languages directly into Java applications. This began a new generation of polyglot applications, as developers were able to construct Java solutions containing scripts written in languages such as JavaScript and Python. The JavaScript engine that was used in Java 6 was called Rhino
. It is an implementation of the JavaScript engine, developed entirely in Java. While it contains a full JavaScript implementation, it is an older engine and is no longer compliant ...

Get Java 9 Recipes: A Problem-Solution Approach, Third Edition now with O’Reilly online learning.