CheerpJ

JVM replacement for the browser

Deprecation notice
CheerpJ 2 is deprecated. Consider migrating to CheerpJ 3 .
CheerpJ 3.0 now available

CheerpJ is a drop-in replacement for the JVM. It has extensive compatibility with Java 8 (tested on Oracle Forms, EBS, Swing, AWT and numerous frameworks and libraries), including Swing, reflection and dynamic class loading.

With CheerpJ, you can:

CheerpJ is based on a full OpenJDK runtime environment and supports:

Getting started

Know what you’re building? Jump straight to the relevant tutorial:

What is CheerpJ?

CheerpJ is constituted of three components:

  1. The CheerpJ AOT compiler, an LLVM-based Java-bytecode to JavaScript compiler. The CheerpJ AOT compiler is available for Linux, macOS and Windows.
  2. The CheerpJ runtime library, a full Java SE runtime in WebAssembly and JavaScript. The CheerpJ runtime is cloud-hosted and accessed by the community free of charge for non-commercial purposes only. For self-hosting and commercial please visit our licensing page.
  3. The CheerpJ on-the-fly Java-to-JavaScript compiler, a reduced JavaScript version of the CheerpJ compiler that can be distributed with applications compiled with CheerpJ to enable dynamic features of Java such as reflection.

What is unique about CheerpJ?

  1. CheerpJ can handle 100% of Java 8, including Swing, reflection and dynamic class loading with no manual intervention on the code.
  2. CheerpJ works directly on Java bytecode, and does not require access to the Java source code.
  3. CheerpJ comes with a full Java SE runtime, inclusive of Swing/AWT. It supports audio, printing, and any other Java SE features. The runtime supports WebAssembly for optimal performance and size.
  4. The JavaScript code generated by CheerpJ is highly optimised and garbage-collectible.
  5. CheerpJ enables bidirectional Java-JavaScript interoperability. JavaScript libraries, as well as the DOM, can be called and manipulated from Java. Converted Java modules can be invoked from JavaScript.
  6. CheerpJ supports Java multi-threading. In addition, it allows one to create concurrent applications by using WebWorkers.

Licensing

CheerpJ is free for technical evaluation and non-commercial use. See licensing for details.

Demos

Several demos of CheerpJ can be found here.

Feedback

Report issues on GitHub

Join the Discord server

Was this page helpful?
Suggest changes