Wasm-based CheerpJ runs Java in web browsers

Leaning Technologies has released CheerpJ 3.0, a WebAssembly JVM that runs in modern web browsers. CheerpJ 3.0 is a full rewrite of CheerpJ that supports “very large” Java applications, such as IntelliJ IDEA and Minecraft, the company said in a February 1 announcement.

Replacing 2022’s CheerpJ 2.3 as Leaning Technologies’ long-term supported version, CheerpJ 3.0 draws on lessons from seven years of enterprise and community use of CheerpJ, and from other WebAssembly-based projects such as CheerpX, an x86-to-WebAssembly virtualization system.

CheerpJ compiles Java bytecode into JavaScript using a JIT (just-in-time) compiler for Java bytecode. It includes a complete and unmodified build of OpenJDK, along with a virtualized system layer including virtualized file systems and virtualized networking support using Tailscale. Key capabilities of CheerpJ 3.0 include:

  • Running large, unmodified Java applications in browsers without plugins or a Java installation.
  • No server-side component is required.
  • Works from unmodified JAR (Java Archive) files, with no need for a compilation or preprocessing step.
  • Supports reflection and class loaders.
  • Interoperability with JavaScript.

CheerpJ 3.0 is currently limited to Java 8 support. However, a major motivation for the new architecture was to support multiple Java and runtime versions. Leaning Technologies plans to add support for more modern Java LTS (Long-Term Support) versions later in 2024, starting with Java 11. Long-term goals include reaching parity with the most recent Java LTS version, which is currently JDK 21.

Copyright © 2024 IDG Communications, Inc.


This website uses cookies. By continuing to use this site, you accept our use of cookies.