Paul Krill
Editor at Large

Wasm-based CheerpJ runs Java in web browsers

news
Feb 2, 20242 mins

WebAssembly JVM promises to run ‘very large’ unmodified Java applications in modern browsers without plugins or a Java installation.

Java / coffee
Credit: Robert Shunev

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author