Rhino implements JavaScript in Java so applications can embed scripting, compile scripts, or run an interactive shell on the JVM.
Overview
Rhino is an open-source JavaScript implementation written entirely in Java. It is typically embedded in Java applications to give end users scripting, and has historically shipped as the default scripting engine in J2SE 6.
Modern releases split functionality into Maven modules: core runtime, optional tools with shell and debugger, XML support, ScriptEngine bridge, an all-in-one JAR, and Kotlin-oriented helpers. The runtime targets Java 17 and above to run; embedders often depend only on the core module without Global-style file and process helpers unless they need the interactive shell.
Capabilities include ECMAScript language features documented in a compatibility table for ES6 and later, a command-line shell, debugger, and JavaScript-to-Java interoperability patterns described in project docs. Releases publish to Maven Central; consumers can run the shell via Gradle, a shadow JAR, or the tools main class.
Rhino is maintained by Mozilla contributors with tests spanning legacy Mozilla suites and test262, optional Android integration tests, and JMH benchmarks for performance work.
Key features
- JavaScript execution on the JVM
- Modular runtime, tools, and XML
- Interactive shell and debugger
- Java ScriptEngine adapter module
- Java interop for scripting Java APIs
- test262 and legacy test coverage
Use cases
- Embedding scripts in Java applications
- Server-side or tooling JS on JVM
- Batch compilation or shell experimentation