How CheerpJ works

Run existing Java applications inside modern web browsers

CheerpJ provides a browser-based Java Virtual Machine and a full Java SE runtime based on OpenJDK, allowing existing Java bytecode to run in modern browsers using WebAssembly and JavaScript.

Browser-based Java runtime

Move the Java runtime into the browser

Traditional Java applications depend on a Java Runtime Environment installed on each user device. CheerpJ delivers the runtime and application as web assets, then executes the existing Java bytecode inside the browser.

This allows organisations to retain their Java applications and backend systems while changing how the software is delivered to users.

Application

Existing Java files

JARs, classes, dependencies, libraries and application resources.

Runtime

CheerpJ

A browser-based Java Virtual Machine and Java SE runtime built using WebAssembly and JavaScript.

Delivery

Modern browser

The application runs through standard web technologies without a browser plugin or locally installed Java runtime.

Core architecture

The components behind CheerpJ

CheerpJ combines a Java runtime with browser-based components for interfaces, files and network access.

01

Java runtime

A browser-based JVM and Java SE runtime built using WebAssembly and JavaScript.

02

Window manager

A virtualised window manager that renders Java AWT and Swing interfaces using browser-native HTML elements and canvases.

03

Filesystem

A virtualised filesystem that supports server-hosted application resources and persistent browser storage.

04

Networking

Browser-based networking for HTTP, HTTPS and more advanced connections to existing application services.

Application execution

What happens when a user opens the application?

CheerpJ loads the runtime, reads the existing application files and executes the Java bytecode within the browser.

1

The browser loads CheerpJ

CheerpJ is added to a web page as a JavaScript library. The runtime and application files can be served from your infrastructure or loaded using the CheerpJ cloud-hosted runtime.

2

CheerpJ loads the application bytecode

CheerpJ works directly with compiled Java bytecode, including JAR files, dependencies, third-party libraries, application resources and custom class loaders.

3

The runtime executes the application

CheerpJ begins executing Java bytecode using its interpreter. Execution information is collected so frequently used code can later be compiled Just-in-Time for improved performance.

4

The Just-in-Time compiler optimises execution

Frequently executed Java bytecode can be compiled into optimised JavaScript, improving application performance while preserving the original Java application.

5

Browser APIs provide access to the environment

User interfaces, file access, networking, printing, audio and clipboard operations are connected through browser APIs and CheerpJ's browser-based runtime components.

Application compatibility

What happens to each part of the Java application?

CheerpJ provides browser-based equivalents for the runtime services that would normally be supplied by a locally installed Java environment.

Java application component How CheerpJ handles it
Java bytecode Executed by the CheerpJ JVM inside the browser.
Java standard library Provided by CheerpJ's Java SE runtime, based on OpenJDK.
Swing and AWT interfaces Rendered through a virtualised window manager using HTML elements and HTML5 canvases.
JARs and dependencies Loaded directly as application resources, normally without requiring access to the original source code.
Filesystem access Provided through virtual filesystem backends for server-hosted files and persistent browser storage.
HTTP and HTTPS networking Browser-compatible requests use standard browser networking, subject to normal browser security and origin policies.
Private and enterprise networking Access to private services and more advanced networking scenarios can be supported using CheerpJ's networking capabilities where required.
Clipboard, audio and printing Connected to supported browser capabilities and permissions.
JavaScript integration Supported through bidirectional Java and JavaScript interoperability APIs.
Native methods Native Java methods can be implemented using JavaScript and integrated with CheerpJ where required. Existing platform-specific native binaries do not execute directly inside the browser.
Deployment architecture

Browser-based execution, not remote application streaming

CheerpJ runs the Java application on the user's device inside the browser. It does not require a separate remote desktop or application streaming session for every user.

Client-side execution

Java application code executes within the user's browser rather than on a remote application server.

Static deployment

The CheerpJ runtime, JARs and supporting assets can be deployed as static web resources.

Existing backends

Applications can continue communicating with existing APIs and backend services, subject to normal browser security policies and any required CheerpJ networking configuration.

Centralised updates

Application files can be updated on the web server instead of being installed separately on every user device.

Browser security model

Run Java within the browser sandbox

CheerpJ operates entirely within the browser's security model. Java applications do not receive unrestricted access to the operating system, and access to files, networking and other resources is mediated through browser APIs and CheerpJ's runtime components.

Access to files, networking, clipboard data and other system capabilities is handled through browser APIs, CheerpJ's virtualised components and the permissions available to the hosting web page.

Remove legacy client dependencies

  • No locally installed Java runtime required
  • No legacy Java browser plugin
  • No dependency on Internet Explorer
  • Application assets can be centrally managed
  • Access remains subject to browser permissions

Security responsibility: Your organisation remains responsible for the security of the application, hosting environment, authentication, backend services and access controls.

Existing Java software

Designed for real enterprise Java applications

CheerpJ has extensive compatibility with Java 8, Java 11 and Java 17, including common desktop frameworks and dynamic Java features.

01

Desktop applications

Run existing Java desktop software, including applications built with Swing and AWT.

02

Java Web Start

Move Java Web Start and JNLP applications to modern browser-based delivery.

03

Java Applets

Run Java 8 Applets in modern browsers without relying on a legacy Java browser plugin.

04

Java libraries

Use existing Java libraries from JavaScript or TypeScript applications through CheerpJ's library APIs.

05

Complex bytecode

Support for third-party libraries, obfuscated code, reflection, dynamic class loading and custom class loaders.

06

Integrated web applications

Connect Java components to web interfaces, browser APIs and JavaScript libraries.

Compatibility depends on the APIs, native libraries, network protocols and operating-system integrations used by the application. Testing the actual application is an important part of evaluation.

Deployment options

Choose the right delivery model

Integrate CheerpJ directly into a web application or use a browser extension for supported Applet and Java Web Start use cases.

For application teams

Integrate CheerpJ into a web application

Add CheerpJ to a web page, configure the application files and use the JavaScript API to start a Java application, Applet, JNLP application or library.

This gives your team control over the page, authentication, application lifecycle, deployment and integration with other web components.

For enterprise users

Use a CheerpJ browser extension

The CheerpJ JNLP Runner and CheerpJ Applet Runner provide extension-based options for selected Java Web Start and Java Applet deployments.

This can provide a faster route for IT teams that need to restore access to an existing application without first creating a custom web integration.

Application evaluation

Test CheerpJ with your actual application

The most reliable way to assess CheerpJ is to test it with the application's real JARs, dependencies, backend systems and user workflows.

This provides a clearer picture of compatibility, performance, integration requirements and the work needed for production deployment.

What to review

  • Java version and application packaging
  • Swing, AWT, Applet or JNLP requirements
  • Native methods and JNI dependencies
  • Networking and authentication
  • File access, clipboard and printing
  • Browser and device requirements
  • Hosting and deployment options

Request a demo

Discover how to modernize and improve access to your legacy Java applications with CheerpJ.

Schedule a free demo with our team to learn how CheerpJ can help address your Java requirements.

Fill in the form or book a demo directly here