CheerpJ 3.0 now available
CheerpJ 3.0 has been released. Read the release announcement for more information.
CheerpJ 3.0rc2 is out now! Thank you to the community and all pilot testers for their invaluable feedback. In this version:
- Much improved library mode: support for object fields, arrays,
instanceof, plus quality-of-life and debugging improvements
- Web Worker support
- Restore support for AWT to match CheerpJ 2.3
- Support for
synchronizedmethods in the JIT
- Improved support for reflection, clipboard, fonts, and class loaders
- A new loading screen animation
- Support for
- Fixed preloading support
- Many other bug fixes and improvements
CheerpJ is a WebAssembly-based JVM that runs fully client side in the browser. Alongside this post, we’ve written a new post going into detail on CheerpJ 3.0:
Deep dive into CheerpJ 3.0
This is a release candidate intended for testing and feedback. You can upgrade to CheerpJ 3.0rc2 using the following script tag:
If you’re coming from CheerpJ 2, please read the migration guide before upgrading.
New features in CheerpJ 3.0rc2
Improvements to library mode
In CheerpJ 3.0rc1, library mode was limited to calling constructors and methods. We’ve expanded the feature set to include:
- Passing JS arrays to Java arrays via copying. Standard arrays, typed arrays, and multidimensional arrays are supported.
- Passing JS arrays to Java
JSObject: The incoming value is wrapped and opaquely stored in a Java
JSObject, and can be passed back to JS for further operations.
- Public Java fields can now be both read/written from JS with appropriate type conversion.
- Classes in JS now support
instanceof, reflecting the
extendsrelationship in Java. Due to limitations of JS inheritance model, instanceof checks of Java interfaces will not work.
Web Worker support
CheerpJ 3.0rc2 adds support for Web Workers. Simply call
importScripts from a worker to load CheerpJ, then use CheerpJ as usual.
- This replaces the
CheerpJWorkerAPI (CheerpJ 2 only).
- Anything that requires DOM access (such as displaying a UI) is not supported in a worker.
Improved font support
CheerpJ now ships fonts for international character sets.
Try CheerpJ 3.0rc2 todayGet started Migration guide
Your feedback is invaluable in helping us identify and fix potential issues and ensure that the final release is as stable and polished as possible. Here are some ways to help:
- Try the release candidate today.
- Test it in your real-world scenarios.
- Report any bugs or issues you encounter on GitHub or Discord.
- Provide feedback on new features and improvements.
- Join the Discord and share what you’re working on.
We plan to fully release CheerpJ 3.0 in early 2024.
Thank you for your continued support in making CheerpJ the best it can be!