Rhino is an open-source implementation of JavaScript written entirely in Java
Перейти к файлу
Gregory Brail 290b34ba73 Update version number to 1.7.7.2. 2017-08-24 14:40:28 -07:00
examples Replace StringBuffer with StringBuilder if possible 2015-02-09 15:46:25 -08:00
gradle/wrapper Add "distZip" gradle task. 2015-09-01 10:30:56 -07:00
man Add manpage for Rhino shell. 2015-02-13 15:58:54 -05:00
maven Update version number to 1.7.7.2. 2017-08-24 14:40:28 -07:00
src Update version number to 1.7.7.2. 2017-08-24 14:40:28 -07:00
test262@acf2d0cb11 Update test262 to latest code from master. 2015-09-08 11:00:36 -07:00
testsrc Cover test cases for data view with offsets. 2017-08-18 13:24:11 -07:00
tools/ci/linux Add a script to build a release. 2017-08-24 13:53:49 -07:00
toolsrc Add checkstyle to the build. 2017-07-28 12:20:37 -07:00
xmlimplsrc Add checkstyle to the build. 2017-07-28 12:20:37 -07:00
.gitattributes Add .gitattributes. 2015-05-18 15:48:23 -07:00
.gitignore Fixing PR 2015-06-23 08:50:03 +03:00
.gitmodules Lightweight test262 runner 2015-06-19 00:23:35 +03:00
.travis.yml Switch Travis config. 2017-07-13 17:22:14 -07:00
LICENSE.txt
NOTICE.txt Add a NOTICE with the V8 copyright message. 2015-02-23 10:30:00 -08:00
README.md Update version number to 1.7.7.2. 2017-08-24 14:40:28 -07:00
RELEASE-NOTES.md Update version number to 1.7.7.2. 2017-08-24 14:40:28 -07:00
apiClasses.properties
build-date
build.gradle Add checkstyle to the build. 2017-07-28 12:20:37 -07:00
build.properties Update version number to 1.7.7.2. 2017-08-24 14:40:28 -07:00
build.xml Initial checkin of typed arrays and tests from V8. 2015-03-02 10:08:55 -08:00
checkstyle.xml Add checkstyle to the build. 2017-07-28 12:20:37 -07:00
gradle.properties Update version number to 1.7.7.2. 2017-08-24 14:40:28 -07:00
gradlew Permissions fix. 2015-05-06 14:20:06 -07:00
gradlew.bat Permissions fix. 2015-05-06 14:20:06 -07:00
release-steps.txt Update release code. 2016-02-01 10:34:02 -08: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

Release Notes for recent releases.

Compatability 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 build/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.7.2.jar
Rhino 1.7.7.2 2017 08 24
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