Java Online Runner

Initializing runtime environment… First run compiles Java in-browser; may take 10~30s, please wait
Code
 

What is Java Online Runner?

This tool is powered by CheerpJ, a Java Virtual Machine compiled to WebAssembly. It compiles and runs Java source code directly in the browser with a full OpenJDK runtime. No JDK installation and no server are required.

Key Features

  1. In-browser compilation: a built-in javac compiler (ECJ) compiles your source inside the browser, consistent with a local environment.
  2. Ready to go: the first load downloads about 20MB of runtime resources which are then cached.
  3. Output capture: System.out and System.err output is shown in real time.

How is this different from the server version?

We also provide a Java Online Compiler with JDK 8 / JDK 21 versions. Use the browser version for lightweight learning and quick testing, and the server version when you need a specific JDK or heavy dependencies.

Usage

  1. Type or paste Java code (a class with a main method).
  2. Click Run to compile and execute.
  3. Compilation errors and output appear in the output panel.
Initializing runtime environment…
0%