Nashorn (JavaScript engine)
JavaScript engine developed in Java
title: "Nashorn (JavaScript engine)" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["jvm-programming-languages", "javascript-engines", "cross-platform-software", "software-using-the-gpl-linking-exception", "oracle-software"] description: "JavaScript engine developed in Java" topic_path: "technology/programming-languages" source: "https://en.wikipedia.org/wiki/Nashorn_(JavaScript_engine)" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0
::summary JavaScript engine developed in Java ::
::data[format=table title="Infobox software"]
| Field | Value |
|---|---|
| name | Nashorn |
| developer | Oracle Corporation, OpenJDK Community |
| latest release version | 15.7 |
| latest release date | |
| operating system | Cross-platform |
| platform | Java Virtual Machine |
| programming language | Java |
| genre | JavaScript engine |
| license | GPL with a linking exception |
| :: |
| name = Nashorn | logo = | screenshot = | caption = | developer = Oracle Corporation, OpenJDK Community | latest release version = 15.7 | latest release date = | latest preview version = | latest preview date = | operating system = Cross-platform | platform = Java Virtual Machine | language = | programming language = Java | genre = JavaScript engine | license = GPL with a linking exception | website = Nashorn is a JavaScript engine developed in the Java programming language originally by Oracle and later by the OpenJDK Community. It relies on the support for dynamically typed languages on the Java Platform (JSR 292) (a concept first realized in the experimental Da Vinci Machine and a standard part of Java 7 and later.) Nashorn was included with Java 8 through JDK 14.{{cite web | url=http://www.wiki.jvmlangsummit.com/images/c/ce/Nashorn.pdf | title=Adventures in JSR-292 or How To Be A Duck Without Really Trying | date=July 2011 | last=Laskey | first=James | publisher=Oracle Corporation | access-date=2011-07-24 | archive-url=https://web.archive.org/web/20160603132421/http://wiki.jvmlangsummit.com/images/c/ce/Nashorn.pdf | archive-date=2016-06-03 | url-status=dead
History
The project was announced first at the JVM language summit in July 2011,{{cite web | url=http://openjdk.java.net/projects/mlvm/jvmlangsummit/agenda.html | title=JVM Language Summit — Agenda | date=July 2011 | publisher=Oracle Corporation | access-date=2011-07-24 | archive-date=2011-08-19 | archive-url=https://web.archive.org/web/20110819110827/http://openjdk.java.net/projects/mlvm/jvmlangsummit/agenda.html | url-status=dead | url=http://www.wiki.jvmlangsummit.com/images/2/27/JVMLS_GES.pdf | title=JVM Language Summit: Moving Java Forward, aka 'Pointy haired manager talk' | last=Saab | first=Georges | date=2011-07-19 | publisher=Oracle Corporation | access-date=2011-07-24 | archive-url=https://web.archive.org/web/20120423215424/http://wiki.jvmlangsummit.com/images/2/27/JVMLS_GES.pdf | archive-date=2012-04-23 | url-status=dead | url=http://www.infoworld.com/d/application-development/oracle-prepping-its-nashorn-javascript-engine-175159 | title=Oracle prepping its Nashorn JavaScript engine | last=Krill|first=Paul | date=2011-10-05 | publisher=InfoWorld | access-date=2011-10-08}}
On November 21, 2012, Oracle formally announced the open sourcing of the Nashorn source on the OpenJDK repository. The project aim will be to allow embedding JavaScript in Java applications via JSR-223 and to develop standalone JavaScript applications.{{cite web | url=http://mail.openjdk.java.net/pipermail/announce/2012-November/000139.html | title=CFV: New Project: Nashorn | last=Coomes|first=John | date=2012-11-21 | publisher=Oracle Corporation | quote=I hereby propose the creation of the Nashorn Project with Jim Laskey as the Lead and HotSpot group as the sponsoring Group. In accordance with the OpenJDK guidelines [1], we would like to start a new project to implement a lightweight high-performance JavaScript runtime in Java with a native JVM | access-date=2012-11-24}} On December 21, 2012, Oracle announced Nashorn source was publicly released in the OpenJDK repository.{{cite web | url=https://blogs.oracle.com/nashorn/entry/open_for_business | title=Open for business | last=Laskey|first=J | date=2012-12-21 | publisher=Oracle Corporation | access-date=2012-12-21}}
It provides a 100% support of ECMAScript 5.1. It was the first JavaScript implementation to achieve 100% pass rate on the ECMAScript 5.1 test suite.
With the release of Java 11, Nashorn was deprecated citing challenges to maintenance, and has been removed from JDK 15 onwards.{{cite web | url=http://openjdk.java.net/jeps/335 | title=JEP 335: Deprecate the Nashorn JavaScript Engine | date=2017-07-17 | access-date=2018-09-25}}
Nashorn development continues on GitHub as a standalone OpenJDK project and the separate release can be used in Java projects from Java 11 and up.
Name
Nashorn ("nahss-horn") is the German translation of rhinoceros, a play on words on Rhino, the name of a JavaScript engine implemented in Java and provided by Mozilla Foundation. The latter gets its name from the animal on the cover of the JavaScript book from O'Reilly Media.
Performance
According to Oracle benchmarks, Nashorn performance is several orders of magnitude faster than the alternative Rhino JavaScript engine.{{cite web | url=https://blogs.oracle.com/nashorn/entry/nashorn_performance_work_in_the | title=Nashorn Architecture and Performance Improvements in the Upcoming JDK 8u40 Release | date=2014-12-12 | publisher=Oracle Corporation | access-date=2015-09-06}}
References
References
- (2013-04-18). "Proposed new schedule for Java 8".
- (2013-04-18). "JDK 8". OpenJDK.
- "Java Platform, Standard Edition Java API Reference".
- "Tweet showing all ECMAScript 5.1 tests passing on the screen of a Nashorn developers' computer".
- (2020-01-10). "JEP 372: Remove the Nashorn JavaScript Engine".
- "JavaScript: The Definitive Guide, 5th Edition". O'Reilly Media, Inc.
::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::