Rhino is an open-source implementation of JavaScript written entirely in Java
Перейти к файлу
Gregory Brail 418cd219eb Working on release. 2020-09-02 10:32:02 -07:00
.circleci Implement standard Java ScriptEngine 2020-06-10 17:12:49 -07:00
benchmarks/org/mozilla/javascript/benchmarks Many small fixes suggested by FindBugs and other linters 2020-06-19 12:52:50 -07:00
examples fixed imports 2019-08-02 14:26:44 -07:00
gradle/wrapper Upgrade Gradle version to 6.5. 2020-06-05 11:36:05 -07:00
man Add manpage for Rhino shell. 2015-02-13 15:58:54 -05:00
src Working on release. 2020-09-02 10:32:02 -07:00
test262@041da54c02 Improve and update test262 integration 2018-01-16 13:20:53 -08:00
testsrc Make __proto__ more closely match the spec 2020-08-25 08:52:17 -07:00
tools/ci/linux Fix release script. 2019-05-17 11:23:57 -07:00
toolsrc Debugger: fix NPE in variables view when expanding "CallSite" 2020-07-06 08:54:16 -07:00
xmlimplsrc Many small fixes suggested by FindBugs and other linters 2020-06-19 12:52:50 -07:00
.gitattributes Add .gitattributes. 2015-05-18 15:48:23 -07:00
.gitignore add eclipse support to the gradle script and ignore special eclipse directories 2017-08-31 17:47:37 -07:00
.gitmodules Lightweight test262 runner 2015-06-19 00:23:35 +03:00
.travis.yml add java11 to travis test matrix 2020-06-29 11:21:58 -07:00
CODE_OF_CONDUCT.md Add Mozilla Code of Conduct file 2019-04-10 16:16:46 -07:00
LICENSE.txt Update LICENSE.txt to MPL 2.0 2012-06-06 15:23:31 +02:00
NOTICE.txt Add a NOTICE with the V8 copyright message. 2015-02-23 10:30:00 -08:00
README.md Working on release. 2020-09-02 10:32:02 -07:00
RELEASE-NOTES.md Working on release. 2020-09-02 10:32:02 -07:00
build-date Massive reconfiguration of the cvs directory structure: 2001-04-24 20:27:04 +00:00
build.gradle try to fix circle, increase Xss 2020-06-24 16:45:01 -07:00
checkstyle.xml avoid star imports across the codebase 2018-10-11 08:56:37 +00:00
gradle.properties Working on release. 2020-09-02 10:32:02 -07:00
gradlew Update Gradle wrapper version. 2019-05-15 11:25:58 -07:00
gradlew.bat Update Gradle wrapper version. 2019-05-15 11:25:58 -07:00
release-steps.txt Working on release. 2020-09-02 10:32:02 -07:00
spotbugs-exclude.xml Many small fixes suggested by FindBugs and other linters 2020-06-19 12:52:50 -07:00

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
Rhino 1.7.13September 2, 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