Applets Are Officially Gone, But Java In The Browser Is Better Than Ever
Summary
Applets are officially, completely removed from Java 26, coming in March of 2026. This brings to an official end the era of applets, which began in 1996. However, for years it has been possible to build modern, interactive web pages in Java without needing applets or plugins. TeaVM provides fast, performant, and lightweight tooling to transpile Java to run natively in the browser. And for a full front-end toolkit with templates, routing, components, and more, Flavour lets you build your modern single-page app using 100% Java.Applet History
Applets were first supported in Java 1.0 in 1996. Back then the web was mostly static text, with only theblink or marquee tags (and animated GIFs) to provide dynamic elements without a server round-trip. Applets allowed Java code to provide full interactivity, whether it was a full AWT/Swing GUI, or a Panel/JPanel on which a full Java2D-rendered scene could be built.
Java developers made games, 3D molecule renderings, business applications, and more. While download speeds and processor speeds in the late 90's placed some limits on what could be done, the creativity shown was remarkable. And for developers, the deployment model for their code was very enticing: post your applet on a web page, and anyone on the planet could run it instantly, as long as they had the Java plug-in installed (which, at the time, was very likely).
In the 2000's, politics interfered and browser vendors removed plug-in support, instead preferring their own walled gardens and restricted sandboxes, which often lag behind industry standards for years. This undid years of innovation and broke large parts of the internet that depended on plug-ins.
TeaVM
TeaVM came to the rescue in 2013, giving Java developers a fast, efficient way to use Java code to drive the browser. With short build times, small app sizes, and batteries-included build tooling, TeaVM was a revolution in developing for the web with Java. Apps that previously required numerous round-trips, or duplicating validation and logic in 2 incompatible code bases, could now run natively in the browser while sharing code with the backend.TeaVM, at its heart, transpiles Java code into JavaScript (or, these days, WASM). However, in order for Java code to be useful for web apps, much more is required, and TeaVM delivers. It includes a minifier, to shrink the generated code and obfuscate the intent, to complicate reverse-engineering. It has a tree-shaker to eliminate unused methods and classes, keeping your app download compact. It packages your code into a single file for easy distribution and inclusion in your HTML page. It also includes wrappers for all popular browser APIs, so you can invoke them from your Java code easily, with full IDE assistance and auto-correct.
TeaVM is revolutionary in its approach and performance. It is a remarkable achievement that opens doors to Java developers. For certain apps, especially games, that primarily render on a canvas, it can be all you need. However, for many web apps, you find you want to build pages out of HTML. You want to build and reuse components. You want binding to reduce boilerplate for populating form elements and reacting to events. You want to communicate with Java services painlessly. For these things, you need Flavour, built on top of TeaVM.
Flavour
The Flavour framework is a batteries-included framework for coding, packaging, and optimizing single-page apps implemented in Java. It supports everything you need in a modern web app, including:- Templates
- Components
- Routing
- JSON Handling
- Resource Embedding
- Security
Flavour is based on HTML templates and CSS for styling, only adding custom tags where needed to implement SPA functionality (conditional markup, variables, etc.). By leveraging HTML and CSS, Flavour ensures long-term compatibility and builds on skills you already have.
Flavour has had a stable API since inception — code written in the earliest days works with only the slightest of changes (addition of a single annotation on POJOs exchanged on the wire). And this stability extends to new releases.
It's easy to get started writing awesome web apps in Flavour:
- The Flavour Book explains everything you need to build a web app using Flavour, starting with the basics.
- You can listen to the Flavour Podcast
Copyright © 2025 Andrew Oliver