Stefano De Rossi edited this page Jul 23, 2018 · 20 revisions

CheerpJ - Java to JavaScript compiler

Gitter chat GitHub Issues Live Demos

CheerpJ is a Java bytecode to JavaScript compiler, compatible with 100% of Java, which allows to compile any Java SE application, library or Java applet into a JavaScript application.

Download latest version: Latest version Latest version changelog

Main project link: http://www.leaningtech.com/cheerpj

If you are unsure how to start, try our Tutorial

What is CheerpJ?

CheerpJ is constituted of three components:

  1. The CheerpJ AOT compiler, an LLVM-based Java-bytecode to JavaScript compiler. This can be used to convert Java archives (e.g. .jar) or single .class files to JavaScript. The CheerpJ AOT compiler is available for Linux, macOS and Windows.
  2. The CheerpJ runtime library, a full Java SE runtime in JavaScript that can be distributed in part or in full with applications converted with CheerpJ.
  3. The CheerpJ on-the-fly Java-to-JavaScript compiler, a reduced JavaScript version of the CheerpJ compiler that can be distributed with applications converted with CheerpJ to enable dynamic features of Java such as reflection.

What is unique about CheerpJ?

  1. CheerpJ can convert 100% of Java including reflection and proxy class creation, 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 component.
  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 to create concurrent applications by using WebWorkers.

Getting Started

You can download CheerpJ beta for Linux, Windows and macOS at this address: https://leaningtech.com/cheerpj/download/noncommercial/

To get started with CheerpJ, please refer to the following pages:

  1. CheerpJ Tutorial
  2. Getting Started
  3. Command Line Options

Bugs and Questions

We welcome any feedback and bug report on it through our Issue Tracking.

You can also get in touch via our mailing list.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.