Why Was the Java Applet API Removed?

The Java Applet API, introduced in 1995 to bring interactive and dynamic content to the early World Wide Web, was officially deprecated in Java SE 9 and marked for removal in Java SE 17. The decision to permanently drop the Applet API from the Java platform was driven by the industry-wide discontinuation of browser plugin architectures, severe and recurring security vulnerabilities, the emergence of modern web technologies like HTML5, and a strategic shift in how Java applications are deployed.

Demise of Browser Plugin Support (NPAPI)

The primary catalyst for removing applets was that modern web browsers stopped supporting them. Java applets relied on the Netscape Plugin Application Programming Interface (NPAPI) to run inside web browsers. Over the course of the 2010s, major browser vendors systematically eliminated support for NPAPI due to performance, stability, and security issues:

  • Google Chrome dropped NPAPI support in 2015.
  • Mozilla Firefox phased it out in 2017.
  • Microsoft Edge launched without plugin support entirely.
  • Apple Safari dropped support for NPAPI-based plugins shortly thereafter.

Without underlying browser support, running an applet directly within a web page became impossible for mainstream internet users, rendering the API functionally obsolete.

Persistent Security Vulnerabilities

Java applets executed untrusted client-side code directly from the web, relying on the Java security sandbox to prevent malicious actions on the user's host machine. Over time, attackers repeatedly found ways to break out of this sandbox through privilege escalation and zero-day vulnerabilities.

The frequency of high-profile security breaches associated with the Java browser plugin placed a severe maintenance burden on Oracle. It required constant, urgent patching and earned the Java runtime an unfavorable security reputation among systems administrators and end users. Disabling the browser plugin—and eventually removing the Applet API entirely—was the most effective path to eliminating this persistent attack surface.

The Rise of Modern Web Standards

When Java applets debuted, web browsers could only display static text, basic layouts, and simple images. Applets filled a technical gap by providing animations, sound, graphical user interfaces, and complex computations.

Over time, open web standards matured to match and exceed applet capabilities natively:

  • HTML5 and CSS3 introduced native audio, video, vector graphics (SVG), and complex styling without third-party plugins.
  • JavaScript gained immense performance improvements via modern just-in-time (JIT) engines.
  • Canvas and WebGL enabled high-performance 2D and 3D graphics inside the browser.
  • WebAssembly (Wasm) provided a pathway to execute high-performance compiled code directly in modern browsers securely.

These native standards eliminated the functional justification for third-party browser plugins like Java Applets, Adobe Flash, and Microsoft Silverlight.

Maintenance Burden and the Shift to Standalone Packaging

Retaining the Applet API in the Java Development Kit (JDK) added unnecessary complexity to the ongoing modernization of the platform. Through initiatives like the Java Platform Module System (Project Jigsaw in Java 9), Java's maintainers aimed to streamline the JDK and strip out outdated or unmaintained modules.

To support developers who still required client-side Java applications, Oracle shifted its focus toward standalone desktop application packaging. Tools such as jlink and jpackage allow developers to bundle a customized Java Runtime Environment directly with desktop applications (such as JavaFX or Swing applications), completely bypassing the security liabilities and constraints of running inside a web browser.