• The End of Applets
  • Erik Costlow
  • The Nuggets translation Project
  • Permanent link to this article: github.com/xitu/gold-m…
  • Translator: 5 having
  • Proofread: PassionPenguin, wumrwds

The end of the Applets application

Oracle marks applets related apis as “deprecated” in JEP-398. In the 2000s, all major browsers no longer support the NPAPI plug-in that Java Applets rely on, and Oracle has been making announcements (JEP-289) about its upcoming deprecation of Applets for years.

Java Applets were the first to support rich Internet applications years ago, when browsers were weak and standards for program development were not yet perfect. The ability to support Java Applets is provided by the Netscape Plug-in Application Interface (NPAPI), which enables Java applications to run in a browser sandbox environment. NPAPI first appeared in browsers in 1995, long before the Mozilla Foundation was founded (2005) and the first version of Chrome (2008).

Before the advent of modern browser standards, these Applets application sequences were often used for file transfers, user authentication, and handling all sorts of situations that Javascript couldn’t handle at the time. Browsers began removing NPAPI support in 2015 to simplify browser maintenance and to keep up with Oracle’s Applets whitepaper: Migration from Java Applets to Plugin-free Java technology.

The security of Java applets was widely discussed before the 2015 API changes, but many organizations were able to protect clients by using administrative tools (e.g., deploying rule sets) or by locking Java and browser compatibility together in an isolated Citrix environment.

Although Java Applets have been labeled deprecated in previous Versions of Java, the API has been retained for the time being in case some applications that call the API without actually using it suffer compilation or runtime errors. In fact, the applets feature has been labeled “deprecated” and “to be removed” in standard documentation for the Java and OpenJDK platforms for nearly 20 years.

InfoQ spoke with Dr. Deprecator and OpenJDK contributor Stuart Marks to find out how the OpenJDK project is defined, uses the @Deprecated tag, and which apis have been Deprecated.

Java 9 enhanced the @deprecated deprecation annotation with a new forRemoval attribute. With the changes proposed by JEP-398, the Applet API will be set to forRemoval = true, and the forRemoval property will allow the compiler and related tools to raise more serious warnings for developers before these apis are actually removed. Code clutter in the development community can be effectively avoided by incrementally setting up multiple warnings, following the message of language architect Brian Goetz in his 2015 talk, “Evolve carefully, avoid breaking.”

Other items that have been removed from the core Java APIs include:

  • CORBA, an interoperable framework, was released by the Object Management Organization (OMG) in 1991 and its latest version was released in 2012
  • JAXB, a collection of XML-related apis, is now maintained in the Jakarta EE library
  • Nashorn, a JavaScript execution engine
  • A few small changes, such as Thread. Stop (Throwable), System. RunFinalizersOnExit, and RMI stubs Compiler

To see if the above changes will affect their application or dependencies, users can try using both tools in their code and dependencies:

  • Jdeps, a tool that analyzes whether an API is being used that is at risk of incompatibility. It can help the development team identify the use of non-canonical apis that have changed in the project
  • Jdeprscan, a tool that analyzes @deprecated Deprecated annotations, analyzes what risks a project will face if adjustments are not made to Deprecated apis

When asked if the deprecation of applets could be applied to serialization, the Applet security manager, and some other aspects, the proposer simply replied, “Hold my beer,” suggesting that changes might already be in the works.

If you find any mistakes in your translation or other areas that need to be improved, you are welcome to the Nuggets Translation Program to revise and PR your translation, and you can also get the corresponding reward points. The permanent link to this article at the beginning of this article is the MarkDown link to this article on GitHub.


The Nuggets Translation Project is a community that translates quality Internet technical articles from English sharing articles on nuggets. The content covers Android, iOS, front-end, back-end, blockchain, products, design, artificial intelligence and other fields. If you want to see more high-quality translation, please continue to pay attention to the Translation plan of Digging Gold, the official Weibo, Zhihu column.