Java Input Dialog - Cheerpj Typing CST Test
Loading…
Java Input Dialog — Cheerpj Code
Shows an input dialog and prints user input to console.
# cheerpj/demo/InputDialog.java
import javax.swing.*;
public class InputDialog {
public static void main(String[] args) {
String name = JOptionPane.showInputDialog("Enter your name:");
System.out.println("Hello, " + name + "!");
}
}Cheerpj Language Guide
CheerpJ is a WebAssembly-based Java-to-JavaScript/WebAssembly compiler and runtime that allows running unmodified Java applications directly inside the browser without plugins. It converts Java bytecode into WebAssembly + JavaScript, enabling full client-side execution of existing JVM applications, applets, and libraries.
Primary Use Cases
- ▸Running legacy Java Swing/AWT desktop apps in the browser
- ▸Migrating Java Applets to modern WebAssembly environments
- ▸Enterprise internal tools requiring Java libraries
- ▸Embedding Java libraries inside JS/Wasm web apps
- ▸Preserving old JVM-based simulations, tools, and educational software
Notable Features
- ▸Convert Java bytecode directly into Wasm + JavaScript
- ▸Full Java runtime emulation in browser
- ▸Supports Swing and AWT UI rendering
- ▸Works without plugins or local JVM
- ▸Can run unmodified .jar files client-side
Origin & Creator
CheerpJ is developed by Leaning Technologies, known for compiling traditional languages to modern web targets like WebAssembly.
Industrial Note
CheerpJ is heavily used by enterprises wanting to preserve legacy Java Swing/AWT applications or Java applets and make them run in modern browsers without rewriting them.