Rhino Interpreter

A JavaScript interpreter written in JavaLanguage; either interprets or compiles JavaScript to JavaByteCode on the fly; reportedly named for TheRhinoBook.

Rhino ships in Sun's Java 6.0.

http://www.mozilla.org/rhino/

Originally developed for a Java implementation of NetscapeNavigator, the code lived on after "Javagator" was axed. Rhino is now licensed by Sun and others. Rhino is used in HttpUnit and HtmlUnit.


I messed around with the RhinoInterpreter for some GreatComputerLanguageShootout tests, including multithreading. (My submissions weren't used, though they worked.)

It has some nice surprises for using Java classes. Anonymous functions can be used in place of Runnable objects for multithreading. Interfaces where all methods have the same signature can be implemented in an anonymous function (the method name is passed). Generic classes can be instantiated and used by treating them like non-generic classes. This made it very easy to write a simple multi-threaded example. --JesseMillikan


The MozillaBrowser instead uses the SpiderMonkey JavaScript implementation (written in C instead of Java). -- AttilaSzegedi

EditText of this page (last edited August 13, 2007) or FindPage with title or text search