Nashorn JavaScript engine for JVM could be axed

By removing Nashorn, some applications may no longer run because of an expectation of JavaScript’s presence

Nashorn, the JavaScript engine for Java Virtual Machine, could be deprecated, having been made obsolete by newer technologies.

Nashorn debuted in Java Development Kit (JDK) 8 in 2014. It has boosted compatibility between Java and JavaScript while offering performance benefits. But the rapid pace of change to ECMAScript language constructs and APIs has made it “challenging” to maintain Nashorn, according to the official deprecation proposal floated in the OpenJDK Java community.

Also, there are other implementations of JavaScript that Java applications can use. For example, GraalJS may soon be available as a module for developers. It uses Oracle’s Truffle library to implement languages and provides most of the same functionality as Nashorn. But there are no current plans to add GraalJS or any other new JavaScript implementation to the JDK itself.

Also to be deprecated are Nashorn’s APIs and the JJS tool. Unaffected by the deprecation is the javax.script scripting API.

By removing Nashorn, some applications may no longer run because of an expectation of JavaScript’s presence. How much Nashorn has been used has not been easy to track, so the Java community process seeks information on its actual usage.