![]() |
Rhino: JavaScriptTM for JavaTM![]() What is Rhino?Rhino is an implementation of JavaScript written entirely in Java. It gets its name from the animal on the cover of the O'Reilly book about JavaScript.BinariesYou can download binaries (JAR files) from ftp://ftp.mozilla.org/pub/js/. Rhino 1.4 Release 3 is a the last qualified release. The current Rhino tip reflects the latest checkins and bug fixes, but has not been fully qualified. The differences between the two are reflected in the change log.SourceThe source code for Rhino is available under the NPL and can be found in the CVS tree at mozilla/js/rhino. It can also be viewed using LXR at http://lxr.mozilla.org/mozilla/source/js/rhino/. Finally, the zip files available with binaries from the ftp site also contain source.Documentation
NewsSome recent items of note. You also might want to look over the netscape.public.mozilla.jseng newsgroup, which has information about both the C and Java implemenatations of JavaScript.6/16/99
6/3/99
5/27/99
5/5/99
4/22/99
JavaScriptTM for the JavaTM platform is an implementation of the JavaScript scripting language that is a standard for web scripting. It is written entirely in the JavaTM programming language and has been licensed by Sun for use with the JavaTM 2 platform. The engine supports on-the-fly compilation to Java programming language bytecodes, providing good execution speed, plus it is fully compatible with the ECMA/ISO standard for ECMAScript. Learn how to use its APIs to add scripting to your applications, or just see how easy it is to script Java programming language classes for testing and exploratory programming. HistoryThe Rhino project was started at Netscape in Fall 1997. At the time, Netscape was planning to produce a version of Navigator written entirely in Java and so it needed an implementation of JavaScript written in Java. When Netscape stopped work on "Javagator", as it was called, somehow Rhino escaped the axe (rumor had it that the executives "forgot" it existed). Since then, a couple of major companies (including Sun) have licensed Rhino for use in their products and paid Netscape to do so, allowing us to continue work on it. Now Rhino is planned to be part of several server products from Netscape as well.Originally, Rhino compiled all JavaScript code to Java bytecodes in generated classfiles. This produced the best performance (often beating the C implementation of JavaScript when run on a JIT), but suffered from two faults. First, compilation time was long since generating Java bytecodes and loading the generated classes was a heavyweight process. Also, the implementation effectively leaked memory since most JVMs don't really collect unused classes or the strings that are interned as a result of loading a class file. So in Fall of 1998, Rhino added an interpretive mode. The classfile generation code was moved to an optional, dynamically-loaded package. Compilation is faster and when scripts are no longer in use they can be collected like any other Java object. We've wanted to put Rhino in Mozilla ever since mozilla.org was started,
but have been limited by the contracts we signed with licensees. Just recently
we received approval from our licensees to make Rhino publicly available
as free source, but they requested that we hold back classfile generation
for the time being. Considering that Rhino probably wouldn't have existed
were it not for their support, I think it's a reasonable request. Most
of what makes Rhino appealling can be had even without classfile generation,
which is primarily a performance enhancement.
Wish ListWe'll continue to evolve Rhino to match the JavaScript language as it changes. If you'd like to contribute bug fixes from your use of Rhino, or even help grow the beast, we'd love your input. Here are a few items on our wish list that we haven't been able to do yet.
Rhino image courtesy of Paul Houle. |
|||||||
| Copyright © 1998-1999 The Mozilla Organization. | |||||||