Rhino (JavaScript engine)

Short description: JavaScript engine written in Java

Rhino

Original author(s)| Norris Boyd
Developer(s)| 1997: Mozilla Foundation, 1998: Mozilla Corporation, now developed by volunteers.
Stable release|

1.7.14 / January 6, 2022; 4 years ago (2022-01-06)

Repository| github.com/mozilla/rhino
Written in| Java, JavaScript
Operating system| Cross-platform
Platform| Java virtual machine
Type| JavaScript engine
License| MPL 2.0
Website| mozilla.github.io/rhino/

Rhino is a JavaScript engine written fully in Java and managed by the Mozilla Foundation as open source software. It is separate from the SpiderMonkey engine, which is also developed by Mozilla, but written in C++ and used in Mozilla Firefox.

## Contents

* 1 History
* 2 Use
* 3 See also
* 4 References
* 5 External links

## History

The Rhino project was started at Netscape in 1997. At the time, Netscape was planning to produce a version of Netscape Navigator written fully in Java and so it needed an implementation of JavaScript written in Java. When Netscape stopped work on Javagator, as it was called, the Rhino project was finished as a JavaScript engine. Since then, a couple of major companies (including Sun Microsystems) have licensed Rhino for use in their products and paid Netscape to do so, allowing work to continue on it.

Originally, Rhino compiled all JavaScript code to Java bytecode in generated Java class files. This produced the best performance, often beating the C++ implementation of JavaScript run with just-in-time compilation (JIT), but suffered from two faults. First, compiling time was long since generating bytecode and loading the generated classes was a resource-intensive process. Also, the implementation effectively leaked memory since most Java virtual machines (JVM) didn't collect unused classes or the strings that are interned as a result of loading a class file.[citation needed] (This has changed in later versions of Java.)

As a result, in the fall of 1998, Rhino added an interpretive mode. The classfile generation code was moved to an optional, dynamically loaded package. Compiling is faster and when scripts are no longer in use they can be collected like any other Java object.

Rhino was released to Mozilla Foundation in April 1998. Originally Rhino classfile generation had been held back from release. However the licensors of Rhino have now agreed to release all of Rhino as open source, including class file generation. Since its release to open source, Rhino has found a variety of uses and an increasing number of people have contributed to the code.[1] The project gets its name from the animal on the cover of the JavaScript book from O'Reilly Media.[2] As of version 1.7R11 (May 2019), Rhino supports Java 8 and up, and supports a number of ECMAScript ES6/ES2015 features.[3]

## Use

Rhino converts JavaScript scripts into classes. Rhino works in both compiled and interpreted mode. It is intended to be used in desktop or server-side applications, hence there is no built-in support for the Web browser objects that are commonly associated with JavaScript.

Rhino can be used as a debugger by using the Rhino shell. The JavaScript shell provides a simple way to run scripts in batch mode or within an interactive environment for exploratory programming. It can be used in applications by embedding Rhino.

A slightly modified version of Rhino 1.6r2 comes bundled with the Sun Microsystems release of Java SE version 6, which was released in December 2006. This makes it easier to integrate JavaScript as part of Java programs and to access Java resources from JavaScript. Other implementations of Java 6 may differ.

## See also

* JavaScript engine
* List of ECMAScript engines
* Nashorn (JavaScript engine) \- the now-deprecated successor to Rhino for the JVM, starting at Java 8

## References

1. ↑ "Rhino History". Mozilla Foundation. https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/History.
2. ↑ O'Reilly's Javascript book, inspiration for the Rhino name
3. ↑ "Rhino ES2015 Support". Mozilla Foundation. https://mozilla.github.io/rhino/compat/engines.html.

## External links

* v
* t
* e

Mozilla

Projects

| Mozilla
Labs|

* Bugzilla
* ChatZilla
* Electrolysis Project
* Jetpack
* Lightning
* Persona
* Prism
* Raindrop
* Skywriter
* Sunbird
* PDF.js
* Sync
* Tinderbox
* Ubiquity

|

Mozilla
Research|

* asm.js
* Daala
* Firefox OS
* OpenFlint
* Open Media
* Rust
* Servo
* Shumway
* WebAssembly
* WebVR

Mozilla
Foundation|

* Mozilla Location Service
* SeaMonkey
* Thunderbird

| Firefox|

* Firefox Browser

* 1
* 1.5
* 2
* 3
* 3.5
* 3.6
* 4
* 5–current
* Future releases
* for Android
* Preview
* for iOS
* Focus

* Firefox Lockwise
* Firefox Monitor
* Firefox Send
* IRL - Online Life is Real Life

|

Origins|

* Mozilla Application Suite
* Netscape Navigator
* Netscape Communicator
* Netscape Communications
* Beonex Communicator

Forks|

* Basilisk
* BurningDog
* Classilla
* Flock
* Gnuzilla
* Goanna
* Iceape
* IceCat
* Icedove
* Iceowl
* Miro
* Netscape 9
* Pale Moon
* Portable Edition
* Swiftfox
* Swiftweasel
* TenFourFox
* UXP
* Waterfox
* xB Browser

Frameworks|

* Add-on
* Gecko
* Necko
* NPAPI
* XPConnect
* XBL
* XPCOM
* XPInstall
* XUL
* XULRunner

Components|

* Composer
* NSPR
* NSS
* Rhino
* SpiderMonkey
* Tamarin

Typefaces|

* Fira Sans
* Zilla Slab

Discontinued|

* Calendar Project
* Camino
* Firefox Home
* Grendel
* Minimo

Discontinued projects are in italics. Some projects abandoned by Mozilla that are still maintained by third parties are in bold.

Organization

| Foundation|

* Former Mozilla Organization
* Mozilla Foundation

|

Subsidiaries|

* Mozilla Corporation
* Mozilla Messaging
* Mozilla Online

Official affiliates|

* Mozilla China
* Mozilla Europe
* Mozilla Japan
* Mozilla Taiwan

People|

* Mitchell Baker
* David W. Barron
* Sheeri Cabral
* Tantek Çelik
* Brendan Eich
* John Hammink
* Robert O'Callahan
* Johnny Stenbäck
* Doug Turner
* Boris Zbarsky

Community

* mozdev.org
* Mozilla Add-ons
* MDN Web Docs
* MozillaZine
* Spread Firefox

Other topics

* The Book of Mozilla
* Code Rush
* Mozilla Public License
* Localizations
* Mascot
* Rebranding / forking

* v
* t
* e

ECMAScript

Dialects|

* ActionScript
* Caja
* JavaScript
* engines
* asm.js
* JScript
* JScript .NET
* QtScript
* TypeScript
* WMLScript

Engines
(comparison)|

* Carakan
* Futhark
* InScript
* JavaScriptCore
* JScript
* KJS
* Linear B
* Narcissus
* QtScript
* Rhino
* SpiderMonkey
* TraceMonkey
* JägerMonkey
* Tamarin
* V8
* ChakraCore
* Chakra
* JScript .NET
* Nashorn

Frameworks|

| Client-side|

* Chaplin.js
* Dojo
* Echo
* Ext JS
* Google Web Toolkit
* jQuery
* Lively Kernel
* midori
* MochiKit
* MooTools
* Prototype
* Pyjs
* qooxdoo
* Rialto
* Rico
* script.aculo.us
* SmartClient
* SproutCore
* Spry
* Wakanda Framework

|

Server-side|

* AppJet
* Jaxer
* Node.js
* WakandaDB

Multiple|

* Cappuccino
* Objective-J
* PureMVC

Libraries|

* Backbone.js
* SWFObject
* SWFAddress
* Underscore.js

People|

* Brendan Eich
* Douglas Crockford
* John Resig
* Scott Isaacs

Other|

* DHTML
* Ecma International
* JSDoc
* JSGI
* JSHint
* JSLint
* JSON
* JSSS
* Sputnik
* SunSpider
* Asynchronous module definition
* CommonJS

Lists
JavaScript libraries
Ajax frameworks
Comparisons
JavaScript frameworks
server-side JavaScript

* v
* t
* e

Java

Platforms|

* Java language
* JVM
* Micro Edition
* Standard Edition
* Enterprise Edition
* Java Card
* Android SDK

Oracle technologies|

* Squawk
* Java Development Kit
* OpenJDK
* Java virtual machine
* JavaFX
* Maxine VM

Platform technologies|

* Applets
* Servlets
* MIDlets
* JSP
* JSF
* Web Start (JNLP)

Major third-party technologies|

* Blackdown
* Eclipse
* GNU Classpath
* GWT
* Harmony
* Hibernate
* IcedTea
* Jazelle
* Spring
* Struts
* TopLink
* WildFly

History|

* Java version history
* Java Community Process
* Sun Microsystems
* Free Java implementations

Major JVM languages|

* BeanShell
* Clojure
* Groovy
* JRuby
* Jython
* Kotlin
* Processing
* Rhino
* Scala

Community|

| Conferences|

* JavaOne
* Devoxx

|

Organizations|

* Apache Software Foundation
* Java Community Process
* Oracle Corporation
* Sun Microsystems, Sun Microsystems Laboratories

People|

* James Gosling
* Arthur van Hoff
* Urs Hölzle
* Patrick Naughton

Category

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Rhino (JavaScript engine). Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Rhino_(JavaScript_engine)&oldid=676724"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template