Wasm-based CheerpJ runs Java in browsers without plugins

Wasm-based CheerpJ runs Java in browsers without plugins

Leaning Technologies has released CheerpJ 3.0, a WebAssembly JVM that runs in modern browsers.

CheerpJ 3.0 is a complete redesign of CheerpJ that supports “very large” Java applications such as IntelliJ IDEA and Minecraft. This is reported by InfoWorld.

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

CheerpJ compiles Java bytecode to JavaScript using a JIT (just-in-time) compiler for Java bytecode. It includes the full and unmodified OpenJDK build as well as a virtualized system layer, including virtualized file systems and virtualized network support with Tailscale.

Here are the main features of CheerpJ 3.0:

  • Running large unmodified Java applications in browsers without plug-ins or Java installation.
  • No server component is required.
  • Works with unmodified JAR (Java Archive) files without the need for compilation or preprocessing.
  • Supports class mapping and loaders.
  • Interaction with JavaScript.

CheerpJ 3.0 is currently limited to support for Java 8. However, the main motivation for the new architecture was to support multiple Java versions and runtimes.

Leaning Technologies plans to add support for more recent Java LTS (long-term support) releases later in 2024, starting with Java 11. Long-term goals include achieving parity with the latest Java LTS release, which is currently JDK 21.

Previously, ProIT reported how to optimize the process of containerizing Java applications.

ProIT also described new features in Java 22.

Additionally, we reported that Java 18 Simple Web Server enables you to use a command-line tool or API to host files.

Subscribe to ProIT on Telegram so you don’t miss out no publication!

Related posts