CheerpJ 2.1 released — Java bytecode to WebAssembly and JavaScript

Stefano De Rossi
Apr 6, 2020 · 2 min read
CheerpJ Logo

Today we release CheerpJ 2.1, the latest major update to our Java to WebAssembly and JavaScript compiler.

About CheerpJ

CheerpJ is a solution to compile ahead of time and execute Java bytecode on the browser in WebAssembly and JavaScript. It comes with a full Java runtime environment, and with Java-JavaScript bidirectional interoperability. CheerpJ provides several browser-based system functions, including virtualized file systems, I/O, networking and audio.

Since release 2.0, CheerpJ supports WebAssembly in its runtime environment, for higher performance and smaller footprint. The full release notes for CheerpJ 2.0 can be found here.

What’s new

CheerpJ 2.1 is a maintenance release introducing several optimizations, bug fixes, and further extending the support for JavaScript interoperability.

New optimizations have been introduced in Java exception handling, which are now compiled to much more efficient JavaScript code. Native Java reflection calls — fully supported by CheerpJ — have also been optimized significantly, lowering the overhead in comparison with standard Java calls. We have continued reducing the build size of CheerpJ ahead-of-time JavaScript output.

Improvements to --stub-natives, a cheerpjfy.pyoption, allow CheerpJ to create stub JavaScript files for native methods. This allows to develop your own browser-based implementations of native methods in JavaScript/WebAssembly.

Several improvements to the robustness of the CheerpJ ahead-of-time compiler, as well as in the Java-JavaScript interoperability, have been introduced.

Getting started

CheerpJ 2.1 is available for Windows, macOS and Linux.

Download and try CheerpJ 2.1

To try out or update to CheerpJ 2.1, simply download the compiler here, and rebuild your project with the new compiler. If using the CheerpJ cloud runtime, make sure to change your CheerpJ runtime header to

<script src=”"></script>


You can find the Documentation for CheerpJ, together with tutorials and examples, on the CheerpJ Documentation page.

Get in touch!

To report any issues, please use our issue tracker. For any question or comment, you can find us on the CheerpJ Gitter channel.

Thank you!

Leaning Technologies


Leaning Technologies' Blog - everything Cheerp, CheerpJ…

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store