Paul Krill
Editor at Large

Nashorn JavaScript engine for JVM could be axed

news
Jun 11, 20182 mins

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

JVM - Java Virtual Machine
Credit: Thinkstock

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.

The specific modules to be deprecated include:

  • scripting.nashorn --, which contains jdk.nashorn.api.scripting and jdk.nashorn.api.tree packages.
  • scripting.nashorn.shell --, which contains the JJS tool.
  • jdk.dynalink --, which holds the Dynalink support library.
Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author