Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Rhino (JavaScript engine)

From Wikipedia, the free encyclopedia
JavaScript engine written in Java
This article has multiple issues. Please helpimprove it or discuss these issues on thetalk page.(Learn how and when to remove these messages)
icon
This articleneeds additional citations forverification. Please helpimprove this article byadding 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)
icon
This articlerelies excessively onreferences toprimary sources. Please improve this article by addingsecondary 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 authorNorris Boyd
Developers1997:Mozilla Foundation
1998:Mozilla Corporation
Present: volunteers
Stable release
1.8.0 / January 3, 2025; 13 months ago (2025-01-03)
Written inJava,JavaScript
Operating systemCross-platform
PlatformJava virtual machine
TypeJavaScript engine
LicenseMPL 2.0
Websiterhino.github.io
Repositorygithub.com/mozilla/rhino

Rhino is aJavaScript engine to run theJavaScriptprogramming language written fully inJava language and managed by theMozilla Foundation asfree and open-source software. It is separate from theSpiderMonkey engine, which is also developed by Mozilla, but written in theC++ language and used in theFirefoxweb browser.

History

[edit]

The Rhino project began atNetscape in 1997, when they planned to produce a version ofNetscape Navigator web browser written fully in Java, which needed an implementation of JavaScript written in Java. When Netscape stopped work onJavagator, as it was called, the Rhino project was finished as a JavaScript engine. Since then, a couple of major companies (includingSun Microsystems) have licensed Rhino for use in their products and paid Netscape to do so, allowing work to continue on it.

Originally, Rhinocompiled all JavaScript code toJava bytecode in generatedJava class files. This produced the best performance, often beating theC++ implementation of JavaScript run withjust-in-time compilation (JIT), but suffered from two faults. First,compile time was long since generatingbytecode and loading the generatedclasses was a resource-intensive process. Also, the implementation effectivelyleaked memory since mostJava virtual machines (JVM) didn'tcollect unused classes or thestrings that areinterned 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 aninterpreted 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 Javaobject.

Rhino was released toMozilla 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 asfree 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 fromO'Reilly Media.[2] As of version 1.80 (January 2025), Rhino supportsJava 11 and up, and supports manyECMAScript ES6/ES2015 features.[3]

Use

[edit]

Rhino converts JavaScript scripts intoclasses. Rhino works in bothcompiled andinterpreted mode. It is intended to be used inclient or server side applications, hence there is no built-in support for theweb browser objects that are commonly associated with JavaScript.

Rhino can be used as adebugger by using the Rhinocommand-line interface orshell. The JavaScript shell provides a simple way to run scripts inbatch processing mode or in anInteractive computing environment forexploratory programming. It can be used in applications by embedding Rhino.

A slightly modified version of Rhino 1.6r2 comesbundled with theSun Microsystems release ofJava 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 fromthe original on 22 October 2020. Retrieved2008-03-20.
  2. ^O'Reilly's Javascript book, inspiration for the Rhino name
  3. ^"Rhino ES2015 Support". Mozilla Foundation. Retrieved2025-01-03.

External links

[edit]
Applications and Projects
Mozilla
Labs
Mozilla
Research
Mozilla
Foundation
Firefox
Origins
Frameworks
Components
Typefaces
Discontinued
Forks
Discontinued projects are initalics. Some projects abandoned by Mozilla that are still maintained by third parties are inunderline.
Organization
Foundation
Official affiliates
People
Other topics
Other
Community
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
Retrieved from "https://en.wikipedia.org/w/index.php?title=Rhino_(JavaScript_engine)&oldid=1317279491"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp