When I wrote the three volumes of Harnessing Java 7 in 2012, I did not include a chapter on the Java Scripting API because of the limited space that I had for each volume. Note the phrase “Java Scripting,” which uses two separate words: “Java” and “Scripting.” “JavaScript” is the name of a scripting language, which has nothing to do with the Java programming language, whereas the phrase “Java Scripting API” is the Java API that lets Java applications interact with scripting languages.

In the first release, I had titled this book Harnessing Scripting in Java, and it covered only the Java Scripting API and Rhino script engine. The release did not cover the JavaScript language. JDK 8 ships with a lightweight high-performance JavaScript ...

Get Scripting in Java: Integrating with Groovy and JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.