CheerpJ 2.1 released — Java bytecode to WebAssembly and JavaScript

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

Today we release 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 .

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 for Windows, macOS and Linux.

Download and try CheerpJ 2.1

To try out or update to CheerpJ 2.1, simply download the compiler , 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=”https://cjrtnc.leaningtech.com/2.1/loader.js"></script>

Documentation

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

Get in touch!

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

Thank you!

Leaning Technologies

Image for post
Image for post

leaningtech

Leaning Technologies' Blog - everything Cheerp, CheerpJ…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

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