← Back to Demos

CheerpJ Demo: SwingSet3 - Java Swing to HTML5

This demo show how any complex Java Swing client can run unmodified as a browser-based Web application. In these demo, 100% of the Java client is running browser-side, with no server-side component other than a regular HTTP server.

The Java Swing toolkit, a GUI system fully implemented in Java, was designed to provide a consistent look and feel across devices and operating systems, and is very prevalent in Enterprise Java applications.

This Java client is converted ahead of time to HTML5 using CheerpJ, with no modification to the original source code. In addition to Swing (and AWT), CheerpJ supports HTTP and socket-based networking, file access, JavaScript interoperability and much more.

Basic usage of CheerpJ requires just 2 lines of code, while a host of optimizations allows to greatly improve performance.

How it works

Three key components


The CheerpJ compiler processes your Java bytecode ahead of time, generating an optimised HTML5 application that can run on any browser.

CheerpJ Runtime

In parallel to your converted application, CheerpJ provides a full, higly-optimised runtime in WebAssembly and JavaScript, keeping 100% of the execution client-side. Based on a full unmodified build of OpenJDK .

CheerpJ OS

CheerpJ provides a full system API, including file system support, networking, I/O, audio, printing, and much more.