(originally published on March 29, 2018)
CheerpJ 1.0 achieves this by:
- Covering 100% of the Java 8 language, including native reflection and dynamic class generation;
- Covering 100% of the Java SE runtime library;
- Supporting file system access (read and write), audio, printing through native browser features;
- Supporting Java multi-threading and allowing to develop concurrent applications leveraging WebWorkers;
- Converting Java from bytecode, without requiring access to the application source code.
What is CheerpJ?
The CheerpJ runtime components, providing:
- Native reflection and dynamic class generation;
- Browser-based implementations of file system, audio, printing, and other ‘operating system’ features.
- Access and manipulation of the DOM from Java;
- Minimise your .jar archives;
CheerpJ does not require any server side support, as all application components are static. You can put a CheerpJ application behind a CDN to virtually cancel any bandwidth costs.
CheerpJ runtime environment and OS features
CheerpJ includes a full Java 8 SE runtime environment, plus a collection of browser-based ‘native’ implementations of different functionalities.
Some of the most interesting are:
- Read-write persistent file system support, via IndexedDB. Read-only file system support via HTTP;
- Support for real-time audio (via WebAudio);
- Support for printing (via the browser printing dialogue);
- Support for WebWorkers, allowing the development of concurrent applications.
What can CheerpJ be used for?
CheerpJ was developed with three main use-case scenarios in mind:
Any example of CheerpJ in action?
CheerpJ has been used by many applications, most of which commercial, since the start of our early adopter program last year, some of them already having reached the market.
Is CheerpJ optimised?
CheerpJ adopts many a optimisation to ensure great performance and minimal footprint in the converted application. These are the main ones:
- Modularised Java 8 runtime. Only the required components of the runtime are downloaded, to minimise the total download footprint. A special debugging feature allows to track the methods originating the request of each runtime module, to allow further optimisations on the application side.
- Removal of bytecode from .jar archives. CheerpJ requires the original .jar archives to be deployed alongside the application to support reflection and dynamic class generation. However, only the archive structure and metadata are preserved, significantly minimising the download size.
- Full-code LLVM-based codegen optimisations. CheerpJ is a full compiler based on LLVM, and as such, it leverages all the full-code optimisations of the LLVM compiler stack.
Why is CheerpJ unique?
Compared to TeaVM, CheerpJ support 100% of the Java 8 SE runtime, as well as native reflection and dynamic class creation. TeaVM is a great technology, but its main purpose is not allowing legacy Java applications to be migrated to HTML5.
Compared to GWT, CheerpJ does not require access to the source code, does not require any modification to the Java source, and has full runtime support. Of course, GWT focus is on the development of new frontend applications, rather then on the migration of legacy ones.
Getting started and documentation
You are welcome to start using CheerpJ 1.0 immediately. We would invite both current and new users of CheerpJ to have a look at our getting started documentation page, since we have changed the URLs for the CheerpJ cloud runtime components.
We hope you will enjoy this release of CheerpJ, and we welcome your feedback. To report any issues, please use our issue tracker. For any question or comment, you are welcome to join the CheerpJ developer mailing list or reach us on Gitter.
Want to know more?
For more information on CheerpJ and Leaning Technologies, visit our website at https://leaningtech.com.