DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Java
  4. Project Nashorn: JavaScript's Second Chance on the JVM

Project Nashorn: JavaScript's Second Chance on the JVM

James Sugrue user avatar by
James Sugrue
CORE ·
Dec. 17, 12 · Interview
Like (1)
Save
Tweet
Share
11.78K Views

Join the DZone community and get the full member experience.

Join For Free

Throughout 2012, JavaScript seems to be solving problems across the industry, causing some justifiable hype across a number of libraries and frameworks.  Oracle's Project Nashorn  was recently announced, due for release with Java 8 in late 2013, which will allow JavaScript to be embedded in Java applications and to develop standalone JavaScript applications.

It makes sense that the JVM maintains it's relevance by providing an improved JavaScript engine: there have been indications that performance is up to five times faster than the current Rhino implementation and the engine footprint is five times smaller. 

We spoke to Henrik Stahl, senior director of Java product management at Oracle to find out more.

DZone: Where did the motivation for Nashorn come from?  

Henrik Stahl: Oracle recognizes that multi-language support is important to Java

  • The Rhino engine currently used is dated and not architected together with the JVM
  • Writing a new engine allows us to validate the Invokedynamic (JSR-292) feature in JDK 7, leverage all new language and JVM features in JDK 8, as well as provide a seamless way of using Javascript and Java code in the same program.

DZone: How long have Oracle been working on it internally?

Henrik: We have been working on Nashorn for the past year and a half.
 
DZone: Was it originally for any other purpose or products?

Henrik:
No. The goals have remained the same since the project's inception, although we have found ways to use it that we hadn't originally anticipated; such as using it as a backend for the Javascript development and debugging features in Netbeans.

DZone: How much of Nashorn is already complete?

Henrik: The Nashorn engine is passing all ECMAScript 5.1 compliance tests.  Early access users have been able to switch their application from Rhino to Nashorn without major issues.
 
 DZone: And what still needs to be added?

Henrik: The team is currently focused on robustness and performance as well continuing to evaluate potential JVM optimizations.  The team is also starting to explore support for upcoming ECMAScript 6.0 features.
 
 DZone: Why do you think that Nashorn will be more successful than Rhino, the previous JS implementation on the JVM? 

  • Nashorn significantly outperforms Rhino, and the gap will increase even more as we now move focus from spec compliance and stability to performance
  • Nashorn implements a new meta-object protocol that simplifies calling Java APIs from JavaScript, and enables seamless interactions between JavaScript and Java.
  • Nashorn enables infrastructure providers to consolidate their JavaScript and Java workloads on single virtual machine technology, and leverage the JVM management, debugging and profiling capabilities.
Java (programming language) Java virtual machine Nashorn (JavaScript engine) JavaScript

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Is a Kubernetes CI/CD Pipeline?
  • 7 Awesome Libraries for Java Unit and Integration Testing
  • Deploying Java Serverless Functions as AWS Lambda
  • How to Create a Real-Time Scalable Streaming App Using Apache NiFi, Apache Pulsar, and Apache Flink SQL

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: