Rhino is an open-source implementation of JavaScript written entirely in Java
Clone or download
gbrail Implement the built-in Set and Map classes for ES6.
Implement these two new classes from the spec and enable relevant
test262 tests for them.

These new classes are only available when the version is
VERSION_ES6 or higher.

WeakSet and WeakMap will come next once we have these squared away.
Latest commit 25ee263 Mar 22, 2018
Permalink
Failed to load latest commit information.
examples Replace StringBuffer with StringBuilder if possible Feb 9, 2015
gradle/wrapper Upgrade Gradle to 4.3.1 and fix problems. Nov 18, 2017
man Add manpage for Rhino shell. Feb 13, 2015
maven Prepare for next iteration. Apr 9, 2018
src Implement the built-in Set and Map classes for ES6. Aug 24, 2018
test262 @ 041da54 Improve and update test262 integration Jan 16, 2018
testsrc Implement the built-in Set and Map classes for ES6. Aug 24, 2018
tools/ci/linux Add a script to build a release. Aug 24, 2017
toolsrc add @override and some more cleanup Aug 13, 2018
xmlimplsrc Add checkstyle to the build. Jul 28, 2017
.gitattributes Add .gitattributes. May 18, 2015
.gitignore add eclipse support to the gradle script and ignore special eclipse d… Sep 1, 2017
.gitmodules Lightweight test262 runner Jun 18, 2015
.travis.yml Switch Travis config. Jul 14, 2017
LICENSE.txt Update LICENSE.txt to MPL 2.0 Jun 6, 2012
NOTICE.txt Add a NOTICE with the V8 copyright message. Feb 23, 2015
README.md Release 1.7.9. Mar 15, 2018
RELEASE-NOTES.md Release notes and update for 1.7.10. Apr 9, 2018
build-date Massive reconfiguration of the cvs directory structure: Apr 24, 2001
build.gradle fix all javadoc errors and all javadoc html warnings Apr 10, 2018
checkstyle.xml Add checkstyle to the build. Jul 28, 2017
gradle.properties Prepare for next iteration. Apr 9, 2018
gradlew Upgrade Gradle to 4.3.1 and fix problems. Nov 18, 2017
gradlew.bat Upgrade Gradle to 4.3.1 and fix problems. Nov 18, 2017
release-steps.txt Update release to 1.7.8-RC1 including release notes. Dec 22, 2017

README.md

Rhino: JavaScript in Java

Rhino

Rhino is an implementation of JavaScript in Java.

License

Rhino is licensed under the MPL 2.0.

Releases

Rhino 1.7R5January 29, 2015
Rhino 1.7.6April 15, 2015
Rhino 1.7.7June 17, 2015
Rhino 1.7.7.1February 2, 2016
Rhino 1.7.7.2August 24, 2017
Rhino 1.7.8January 22, 2018
Rhino 1.7.9March 15, 2018

Release Notes for recent releases.

Compatibility table which shows which advanced JavaScript features from ES5, 6, and 7 are implemented in Rhino.

Documentation

Information for script builders and embedders:

https://developer.mozilla.org/en-US/docs/Rhino_documentation

JavaDoc for all the APIs:

http://mozilla.github.io/rhino/javadoc/index.html

More resources if you get stuck:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Community

Building

How to Build

Rhino builds with Gradle. Here are some useful tasks:

./gradlew jar

Build and create Rhino jar in the buildGradle/libs directory.

./gradlew test

Build and run all the tests.

./gradlew testBenchmark

Build and run benchmark tests.

Releasing and publishing new version

  1. Ensure all tests are passing
  2. Remove -SNAPSHOT from version in gradle.properties in project root folder
  3. Create file gradle.properties in $HOME/.gradle folder with following properties. Populate them with maven repo credentials and repo location.
mavenUser=
mavenPassword=
mavenSnapshotRepo=
mavenReleaseRepo=
  1. Run Gradle task to publish artifacts to Maven Central.
./gradlew publish
  1. Increase version and add -SNAPSHOT to it in gradle.properties in project root folder.
  2. Push gradle.properties to GitHub

Running

Rhino can run as a stand-alone interpreter from the command line:

java -jar buildGradle/libs/rhino-1.7.9.jar
Rhino 1.7.9 2018 03 15
js> print('Hello, World!');
Hello, World!
js>

You can also embed it, as most people do. See below for more docs.

Issues

Most issues are managed on GitHub:

https://github.com/mozilla/rhino/issues

More Help

The Google group is the best place to go with questions:

https://groups.google.com/forum/#!forum/mozilla-rhino