'Which JavaScript (ECMAScript) version does Java's Rhino implementation implement (and what's the update policy?)

Which version of the ECMAScript standard does Java's JavaScript engine Rhino support, how much work is going into fixing bugs and keeping the implementation in sync with the latest standardized version?



Solution 1:[1]

From what is written in the release notes of the versions of Rhino:

  • Rhino 1.5 - JavaScript 1.5/ ECMA Script 3.
  • Rhino 1.6R2 - bundled with Java 6 - JavaScript 1.5, ECMAScript for XML (E4X, part of JavaScript 1.6).
  • Rhino 1.6R6 - support for the remaining JavaScript 1.5 (strict).
  • Rhino 1.7R1 - JavaScript 1.7 new features: generators, iterators, array comprehensions, let expressions, and destructuring assignment.
  • Rhino 1.7R3 - bundled with Java 7 - JavaScript 1.7, partial JavaScript 1.8 and ECMAScript 5 except for strict mode.
  • Rhino 1.7R4 - JavaScript 1.7 is default, ES5 compliance fixes, JavaScript 1.8 generator expressions.
  • Rhino 1.7R5 -
  • Rhino 1.7.6 - Array.find(), @Deprecated annotation, JavaScript 1.8 String.
  • Rhino 1.7.7 - Initial support for ECMA Script 6, ES6 Math, Number and String class.
  • Rhino 1.7.7.1 - fixes

It seems that Rhino versions, Mozilla's JavaScript versions and ECMA Script versions are very different in scope.

Solution 2:[2]

From Java 12 documentation:

https://docs.oracle.com/en/java/javase/12/docs/api/jdk.scripting.nashorn/module-summary.html

Nashorn is 100% compliant with the ECMA-262 Standard, Edition 5.1

Solution 3:[3]

About the compatilibity with ES2015/ES6 only, you have this webpage from the Mozilla's official repository :

https://mozilla.github.io/rhino/compat/engines.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Peter Kofler
Solution 2 serg.nechaev
Solution 3 Jan Molak