Skip to content
Rhino is an open-source implementation of JavaScript written entirely in Java
C++ Java JavaScript C Perl Shell Other
Branch: master
Clone or download

Latest commit

Latest commit b8c7672 May 20, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples fixed imports Aug 2, 2019
gradle/wrapper Update Gradle wrapper version. May 15, 2019
man Add manpage for Rhino shell. Feb 13, 2015
maven Update for 1.7.12 release. Jan 13, 2020
src Symbol.length is 0 May 19, 2020
test262 @ 041da54 Improve and update test262 integration Jan 16, 2018
testsrc Symbol.length is 0 May 19, 2020
tools/ci/linux Fix release script. May 17, 2019
toolsrc Undo setting some members "final". Jan 10, 2020
xmlimplsrc Fix minor static analysis findings. Dec 28, 2019
.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 Increase Travis timeout. Jan 7, 2020
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file Apr 10, 2019
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 Start on 1.7.13. Jan 13, 2020
RELEASE-NOTES.md fix OWASP Cheat Sheet markdown format May 11, 2020
build-date Massive reconfiguration of the cvs directory structure: Apr 24, 2001
build.gradle Update for 1.7.12 release. Jan 13, 2020
checkstyle.xml avoid star imports across the codebase Oct 11, 2018
gradle.properties Start on 1.7.13. Jan 13, 2020
gradlew Update Gradle wrapper version. May 15, 2019
gradlew.bat Update Gradle wrapper version. May 15, 2019
release-steps.txt Update release to 1.7.8-RC1 including release notes. Dec 22, 2017
spotbugs-exclude.xml Undo setting some members "final". Jan 10, 2020

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
Rhino 1.7.10April 9, 2018
Rhino 1.7.11May 30, 2019
Rhino 1.7.12January 13, 2020

Release Notes for recent releases.

Compatibility table which shows which advanced JavaScript features from ES6, and ES2016+ 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.

git submodule init
git submodule update
./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.12.jar -debug -version 200
Rhino 1.7.9 2018 03 15
js> print('Hello, World!');
Hello, World!
js>

There is also a "rhino" package for many Linux distributions as well as Homebrew for the Mac.

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

You can’t perform that action at this time.