Learn about the Nashorn JavaScript engine.

Nashorn replaces Rhino as the default JavaScript engine for the Oracle JVM. Nashorn is much faster since it uses the invokedynamic feature of the JVM. It also includes a command line tool (jjs).


JDK 8 includes the command line tool jjs for running JavaScript.

We can run JavaScript files from the command line (assuming we have Java 8’s bin in our PATH) in the following manner:

$ jjs script.js

Try running jjs in the terminal below:

Get hands-on with 1200+ tech skills courses.