CheerpJ 2.2 released

Lorenzo Marsicano
Jun 1 · 3 min read

Today we release CheerpJ 2.2, the latest major update to our solution to compile and run Java client applications on modern browsers side thanks to JavaScript and WebAssembly.

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. It is a mature technology used by many large organisations worldwide, including Fortune 100 companies and the public sector.

Since release 2.1 (release notes here.), there have been improvements on the generation of stubs for native methods and on how the exceptions are handled, along with a speed-up of our implementation of the native Java reflection calls.

What’s new

Audio

CheerpJ 2.2 resolves a number of audio problems, manifested primarily as audio glitches, with a more solid approach to audio reproduction for which the result can be seen in a video here.

AWT controls

In CheerpJ 2.2, several AWT controls have been reimplemented with a focus on usability and cross-browser compatibility. These include a shiny new scrollbar and text formatting in various text components, while other AWT controls had their functionalities revisited to better reflect the original Java implementation.

New implementation of AWT scrollbars.

Other improvements

Other important features introduced in CheerpJ 2.2 are the support for custom HTTP implementations, a more robust reflection mechanism (native Java reflection is fully supported by CheerpJ), and a fix on how private methods are handled, which are now resolved correctly instead of being added to the class vtable.

The full Change log for version 2.2 of CheerpJ is available here.

Getting started

CheerpJ 2.2 is available for Windows, macOS and Linux.

How to upgrade to CheerpJ 2.2

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

The old 2.1 version will keep working, but the only way to gain the benefits of this new release is to change the runtime endpoint and regenerate the jar.js files.

Please notice that using the new runtime with a jar.js generated with the 2.1 compiler might lead to unexpected behaviours.

Download and Try CheerpJ

If you have never tried our compiler before it's really easy!

Just only have to use our compiler that you can find here and update your HTML page hosting the applet or create a simple HTML for it.

You can follow this link to our wiki and follow the Getting Started for detailed instructions.

Documentation

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

leaningtech

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