Jump to content
Wikipedia The Free Encyclopedia

Rhino (JavaScript engine)

From Wikipedia, the free encyclopedia
JavaScript engine written in Java
This article has multiple issues. Please help improve it or discuss these issues on the talk page . (Learn how and when to remove these messages)
This article needs additional citations for verification . Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Rhino" JavaScript engine – news · newspapers · books · scholar · JSTOR
(June 2011) (Learn how and when to remove this message)
This article relies excessively on references to primary sources . Please improve this article by adding secondary or tertiary sources.
Find sources: "Rhino" JavaScript engine – news · newspapers · books · scholar · JSTOR
(April 2012) (Learn how and when to remove this message)
(Learn how and when to remove this message)
Rhino
Original author Norris Boyd
Developers 1997: Mozilla Foundation
1998: Mozilla Corporation
Present: volunteers
Stable release
1.8.0 / January 3, 2025; 9 months ago (2025年01月03日)
Repository github.com/mozilla/rhino
Written inJava, JavaScript
Operating system Cross-platform
Platform Java virtual machine
Type JavaScript engine
License MPL 2.0
Websiterhino.github.io

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

History

[edit ]

The Rhino project began at Netscape in 1997, when they planned to produce a version of Netscape Navigator web browser written fully in Java, which 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, compile 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 changed in later Java versions.)

As a result, in the fall of 1998, Rhino added an interpreted mode. The classfile generation code was moved to an optional, dynamic loading 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 agreed to release all of Rhino as free and open-source software, 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.80 (January 2025), Rhino supports Java 11 and up, and supports many ECMAScript ES6/ES2015 features.[3]

Use

[edit ]

Rhino converts JavaScript scripts into classes. Rhino works in both compiled and interpreted mode. It is intended to be used in client 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 command-line interface or shell. The JavaScript shell provides a simple way to run scripts in batch processing mode or in an Interactive computing 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

[edit ]

References

[edit ]
  1. ^ "Rhino History". Mozilla Foundation. Archived from the original on 22 October 2020. Retrieved 2008年03月20日.
  2. ^ O'Reilly's Javascript book, inspiration for the Rhino name
  3. ^ "Rhino ES2015 Support". Mozilla Foundation. Retrieved 2025年01月03日.
[edit ]
Projects
Mozilla
Labs
Mozilla
Research
Mozilla
Foundation
Firefox
Origins
Frameworks
Components
Typefaces
Discontinued
Forks
Discontinued projects are in italics. Some projects abandoned by Mozilla that are still maintained by third parties are in underline.
Organization
Foundation
Official affiliates
People
Community
Other topics
Dialects
Engines
Frameworks
Client-side
Server-side
Multiple
  • Cappuccino
Libraries
People
Other
Platforms
Technologies
Oracle
Platform
Major
third-party
History
JVM
languages
Community
Conferences
Organizations
People

AltStyle によって変換されたページ (->オリジナル) /