Inspiration
Many companies still rely on legacy Java Swing desktop applications that no longer run in modern browsers. Rewriting these apps into HTML/JavaScript requires huge time, cost, and effort. I wanted to explore whether we can revive old Java apps without changing their code, simply by running them inside the browser.
That is how JWebNote was born โ a lightweight idea to demonstrate how a regular Java Swing application can instantly become a web app using CheerpJ.
What it does
JWebNote is a simple yet complete note-taking application originally written as a desktop Java Swing program. Using CheerpJ, it runs directly inside any modern browser with:
A text editor
Save & load notes
Browser filesystem integration
No backend required
No Java installation required
Fully client-side execution
Works on Mac, Windows, Linux, and mobile browsers
It proves that Java desktop apps can be converted into web apps without rewriting them.
How we built it
Designed a standard Java Swing UI with JFrame, JTextArea, JMenu, and file dialogs.
Compiled the app into app.jar using IntelliJ IDEA.
Added a simple index.html file that loads the CheerpJ runtime.
Used CheerpJ to run the JAR file inside the browser using:
cheerpjRunJar("/app.jar");
Served the project using a local Python HTTP server.
Tested across browsers โ Chrome, Safari, and Firefox.
Everything works fully offline and fully on-device.
Challenges we ran into
๐น Running Swing UI in a Browser
Swing depends on native OS rendering. CheerpJ maps Swing calls to browser canvas, so debugging UI issues was challenging.
๐น File Handling
Browsers donโt allow free file access. I had to integrate with CheerpJโs virtual filesystem and browser download dialogs.
๐น Packaging the JAR in IntelliJ
Configuring artifacts and setting the main class took some trial-and-error.
๐น Debugging Errors
Java exceptions appear as JavaScript console errors when running in the browser. Understanding those traces required some patience.
Accomplishments that we're proud of
Turned a pure Java desktop app into a 100% web app without rewriting the logic.
Learned how CheerpJ transforms Java bytecode into WebAssembly + JavaScript.
Successfully ran a Swing UI inside Chrome and Safari.
Created a clean, usable note-taking app with minimal code.
Packaged everything in a beginner-friendly way for Devpost judges.
What we learned
๐ง JVM Internals
Understanding how Java bytecode works and how CheerpJ interprets it in the browser.
๐ง Desktop-to-Web Modernization
Realizing older Java systems can be easily revived in the browser without massive rewrites.
๐ง Browser sandboxes
Learning browser security models:
No direct filesystem access
Need local server to load scripts
Handling CORS
Using IndexedDB/virtual FS
๐ง Tooling
Gained hands-on experience with:
IntelliJ artifact building
CheerpJ loader runtime
WebAssembly execution
Local HTTP server hosting
What's next for JWebNote
Here are the planned enhancements:
๐ Feature Upgrades
Cloud sync for notes using Firebase or Supabase
Dark mode
Font customization (size, color, style)
Auto-save functionality
Multiple notes in tabs
Export as PDF
๐ Technical Improvements
Switch to IndexedDB for stable browser persistence
Add offline PWA support
Add CheerpJ static compilation for faster loading
๐ Future Vision
Turn JWebNote into a full example of how legacy Java applications can be brought to the web instantly, helping organizations move away from outdated desktop deployments.