Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Rhino (JavaScript engine)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|JavaScript engine written in Java}} {{Multiple issues| {{more citations needed|date=June 2011}} {{primary sources|date=April 2012}} }} {{Infobox software | name = Rhino | logo = Inicio de ldp para 260px50px moziyarinocrnt.jpg | screenshot = | author = Norris Boyd | caption = | developer = 1997: [[Mozilla Foundation]], 1998: [[Mozilla Corporation]], now developed by volunteers. | latest release version = 1.8.0 | latest release date = {{start date and age|2025|01|03}} | latest preview version = | latest preview date = | operating system = [[Cross-platform]] | platform = [[Java virtual machine]] | language = | programming language = [[Java (programming language)|Java]], [[JavaScript]] | genre = [[JavaScript engine]] | license = [[Mozilla Public License|MPL 2.0]] | website = {{URL|https://rhino.github.io/}} | repo = {{URL|https://github.com/mozilla/rhino}} }} '''Rhino''' is a [[JavaScript engine]] written fully in [[Java (programming language)|Java]] and managed by the [[Mozilla Foundation]] as [[open source software]]. It is separate from the [[SpiderMonkey (JavaScript engine)|SpiderMonkey]] engine, which is also developed by Mozilla, but written in [[C++]] and used in [[Mozilla Firefox]]. == History == The Rhino project was started at [[Netscape Communications Corporation|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 file]]s. 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 [[memory leak|leaked memory]] since most [[Java virtual machine]]s (JVM) didn't [[garbage collection (computer science)|collect]] unused classes or the [[String (computer science)|strings]] that are [[String interning|interned]] as a result of loading a class file.{{Citation needed|date=February 2010}} (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, [[dynamic loading|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 software|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.<ref>{{cite web |url = https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/History |title = Rhino History |publisher = [[Mozilla Foundation]] |access-date = 2008-03-20 |archive-url=https://web.archive.org/web/20201022021252/https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/History |archive-date=22 October 2020 |url-status=dead}}</ref> The project gets its name from the animal on the cover of the JavaScript book from [[O'Reilly Media]].<ref>[http://www.oreilly.com/catalog/jscript5/ O'Reilly's Javascript book, inspiration for the Rhino name]</ref> As of version 1.80 (January 2025), Rhino supports [[Java version history|Java 11]] and up, and supports a number of [[ECMAScript]] ES6/ES2015 features.<ref>{{cite web|url=https://mozilla.github.io/rhino/compat/engines.html|title=Rhino ES2015 Support|publisher=Mozilla Foundation|access-date=2025-01-03}}</ref> == Use == Rhino converts JavaScript scripts into [[class (computer programming)|classes]]. Rhino works in both [[compiler|compiled]] and [[interpreter (computing)|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 [[command line interface|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 [[software bundling|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 == {{Portal|Free and open-source software|Computer programming}} * [[JavaScript engine]] * [[List of ECMAScript engines]] * [[Nashorn (JavaScript engine)]] - the now-deprecated successor to Rhino for the JVM, starting at Java 8 == References == {{reflist}} == External links == * {{Official website|http://mozilla.github.io/rhino/}} {{Mozilla projects}} {{ECMAScript}} {{Java (Sun)}} [[Category:JVM programming languages]] [[Category:Mozilla]] [[Category:JavaScript engines]] [[Category:Cross-platform software]] [[Category:Software using the Mozilla Public License]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Citation needed
(
edit
)
Template:Cite web
(
edit
)
Template:ECMAScript
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Java (Sun)
(
edit
)
Template:Main other
(
edit
)
Template:Mozilla projects
(
edit
)
Template:Multiple issues
(
edit
)
Template:Official website
(
edit
)
Template:Portal
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Template other
(
edit
)