Skip to main content

Nashorn Project Proposed for OpenJDK (Planned for Inclusion in Java 8)

Posted by editor on December 1, 2012 at 9:13 PM PST

During a JavaOne 2012 keynote, I scribbled down a list of key enhancements that are planned for inclusion in Java 8. Among them was Nashorn. At the time, I didn't know much about Nashorn. But, now that John Coomes has formally proposed the creation of an OpenJDK New Project: Nashorn, it seems appropriate to take a closer look.

Nashorn has sufficient visibility to have a brief Wikipedia entry, and we've been highlighting Nashorn news on recently, including Geertjan Wielenga's NetBeans experiments with Embedded Nashorn in JEditorPane.

But, as you read this, you may be (like I was at JavaOne) wondering exactly what this "Nashorn" is. Wikipedia's overview is:

Nashorn is an upcoming JavaScript engine, developed fully in the programming language Java by Oracle Corporation. It is based on the Da Vinci Machine (JSR 292) and will be available for Java 8 in late 2013.

JSR 292 is titled "Supporting Dynamically Typed Languages on the JavaTM Platform"; it's led by John Rose, and both John Rose and JSR 292 won JCP Awards in 2011.

The message from John Coomes states that JSR 223 is also involved:

we would like to start a new project to implement a lightweight high-performance JavaScript runtime in Java with a native JVM. This project intends to enable Java developers to embed JavaScript in Java applications via JSR-223 and to develop free standing JavaScript applications using the jrunscript command line tool.

But there's much more. Here's a relevant snippet:

In particular the project will utilize the MethodHandles and InvokeDynamic APIs described in JSR-292. The goal is to provide a lightweight high performance JavaScript on a native JVM. The scope of this project will include, but is not limited to, a parser API for scanning JavaScript source code, a compiler to convert ASTs from the parser to JVM byte code, and a runtime to support the execution of said generated byte code. Execution of JavaScript in this environment will be in conformance with ECMA-262 Edition 5.1 and will adapt to newer guidelines as standards evolve.

So, we may have lost implementation of Project Jigsaw in Java 8. But, aren't Project Nashorn and Project Lambda (closures) enough in themselves to make Java 8 a pretty significant Java major release?

You can learn more about Nashorn in Jim Laskey's presentation Adventures in JSR 292 (Nashorn).


Our latest article from Manning Publications is Defining Functional Data Structures by Paul Chiusano and Rúnar Bjarnason, authors of the Manning book Functional Programming in Scala.


Our current poll asks What's your current level of involvement with Java 8 Lambda Expressions (closures)? Voting will be open until Friday, December 7.


Our latest Spotlight is Reza Rahman's New Java EE/GlassFish Testimonial:

As you may be aware, we have been making a concerted effort to ask successful Java EE/GlassFish adopters to come forward with their stories. A number of such stories were shared at this year's GlassFish Community event at JavaOne. In addition to Adam Bien's testimonial (which we posted earlier), another story that really stands out is the one from Stephan Janssen...

Previously we spotlighted Mauritius Java User Group Joins JUG Community:

We would like to announce the setting up of Mauritius Java User Group and also we are inviting Java Experts around the world to come and talk in our Country. We have a big java community but we are still very "old-fashion" in terms of java usage, although we have big companies like Accenture, Ceridian, Infosys, TNT Express IT Department, Business & Decision and others here...

Before that was Stephen Chin's The NightHacking Tour Concludes – What is Next?:

I just finished my NightHacking Tour across Europe. In 3 weeks, I hit 2 conferences, 5 user groups, and did over 30 interviews with NightHackers in 7 different countries. Some of the highlights included: Motorcycle ride-ons at JFall and Devoxx; JUG hacking events in London, Munich, Tourin, Lyon, and Paris; Dancing robots at Aldebaran Robotics...

Java News

Here are the stories we've recently featured in our Java News section:

Subscriptions and Archives: You can subscribe to this blog using the Editor's Blog Feed. You can also subscribe to the Java Today RSS feed and the blogs feed.

-- Kevin Farnham (@kevin_farnham)

Related Topics >>