whatisgithub

What is rhino?

mozilla/rhino — explained in plain English

Analysis updated 2026-06-26

4,574JavaScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

Rhino is Mozilla's open-source project that runs JavaScript inside Java applications, letting Java programs execute JavaScript code without a browser or Node.js.

Mindmap

mindmap
  root((repo))
    What It Does
      Run JS in Java
      No browser needed
      Modular components
    Tech Stack
      Java 11+
      JavaScript ES6+
    Use Cases
      Java app scripting
      Plugin systems
      Business rules
    Audience
      Java developers
      Backend teams
    Setup
      JAR dependency
      Maven or Gradle
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run JavaScript logic inside a Java application without a browser or Node.js server.

USE CASE 2

Build a scriptable Java app that lets users write JavaScript plugins or custom rules.

USE CASE 3

Execute JavaScript-based configuration or business logic within a Java backend service.

USE CASE 4

Embed a JavaScript interpreter in a Java desktop or server application for dynamic scripting.

What is it built with?

JavaJavaScript

How does it compare?

mozilla/rhinomustache-dev/mario-kart-3.jsstrider-cd/strider
Stars4,5744,5754,573
LanguageJavaScriptJavaScriptJavaScript
Setup difficultymoderateeasyhard
Complexity3/53/54/5
Audiencedeveloperdeveloperops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Java 11 or higher at runtime, building from source requires Java 17 or higher.

Mozilla Public License 2.0, you can use and modify the code, but modifications to MPL-licensed files must be released under the same license.

So what is it?

Rhino is an open-source project from Mozilla that implements JavaScript in Java. What that means in practice is that Rhino lets Java applications run JavaScript code without needing a browser or a Node.js server. If you have a Java program and want it to execute JavaScript, Rhino is one of the established tools for doing that. The project has been around for a long time and has a long release history going back many years, with the most recent release in early 2026. It requires Java 11 or higher to run. Building it from source requires Java 17 or higher, and the README recommends Java 25 for the best experience. The codebase is organized into separate modules so you only include what your application needs. The core module, called rhino, is necessary for running JavaScript and is what most applications use. Additional modules add a command-line shell and debugger, XML support, and an adapter for Java's standard scripting interface. There is also an all-in-one JAR that bundles the most common modules together for convenience. Rhino supports many modern JavaScript features from ES6 and later versions of the language, and the project maintains a compatibility table on its website listing which features are and are not yet implemented. Documentation lives at rhino.github.io, and full API documentation is available at javadoc.io. The README also links to a list of known projects that use Rhino, which gives a sense of the range of applications that embed it. The project is licensed under the Mozilla Public License 2.0.

Copy-paste prompts

Prompt 1
Show me how to embed Rhino into a Java Maven project to execute a JavaScript string at runtime.
Prompt 2
Write a Java example using Rhino that calls a JavaScript function and returns the result to Java code.
Prompt 3
How do I pass a Java object to a JavaScript script using Rhino so the script can call its methods?
Prompt 4
What ES6 features does Mozilla Rhino support and how do I enable them in my Java application?
Prompt 5
Give me a minimal Rhino setup that reads a .js file from disk and executes it inside a Java program.

Frequently asked questions

What is rhino?

Rhino is Mozilla's open-source project that runs JavaScript inside Java applications, letting Java programs execute JavaScript code without a browser or Node.js.

What language is rhino written in?

Mainly JavaScript. The stack also includes Java, JavaScript.

What license does rhino use?

Mozilla Public License 2.0, you can use and modify the code, but modifications to MPL-licensed files must be released under the same license.

How hard is rhino to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is rhino for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.