16

I have recently read in an article posted by Oracle that they are going to mark the Applet class as deprecated in JDK 9. I have little experience with applets; I have only written some to understand the basics.

Why are they unpopular, and what is the main reason for their deprecation?

Jens Bannmann
  • 4,845
  • 5
  • 49
  • 76
Maksim
  • 351
  • 1
  • 2
  • 12

2 Answers2

28

Applets were very popular a couple of years ago, but now the browser world changed and security is becoming a major focus for all major browser vendors.

The Java team gave its complete set or reasons, alternatives etc. in the document Migrating from Java Applets to plugin-free Java technologies. On page 4, there is the following Executive Overview:

With modern browser vendors working to restrict or reduce the support of plugins like Flash, Silverlight and Java in their products, developers of applications that rely on the Java browser plugin need to consider alternative options. Java developers currently relying on browser plugins should consider migrating from Java Applets to the plugin-free Java Web Start technology.

Supporting Java in browsers is only possible for as long as browser vendors are committed to supporting standards based plugins. By late 2015, many browser vendors had either removed or announced timelines for the removal of standards based plugin support, while some are introducing proprietary browser-specific extension APIs. Consequently, Oracle is planning to deprecate the Java browser plugin in JDK 9.

The deprecated plugin technology will be completely removed from the Oracle Java Development Kit (JDK) and Java Runtime Environment (JRE) in a future Java release TBD. Java Web Start applications do not rely on a browser plugin and will not be affected by these changes.

Community
  • 1
  • 1
Suresh Atta
  • 120,458
  • 37
  • 198
  • 307
  • @nullpointer, the link works fine for me - since April 2018, this answer links to the `web.archive.org` version of that article. Please check again. – Jens Bannmann Jul 08 '18 at 11:42
  • 4
    I think the answer needs to be updated to avoid suggesting Java Web Start as a viable alternative. My clients are receiving notices with their JWS apps that Java Web Start is deprecated, also, and will be "considered for removal in a future Java release." – ryvantage Jul 27 '18 at 13:06
  • www.vantagecp.com/jws%20deprecated.png – ryvantage Jul 27 '18 at 13:09
  • 1
    In JDK 11: "[The Java Plugin and Java WebStart technologies that were deprecated in JDK 9 and marked as candidates for removal in JDK 10, have now been removed.](https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html#JDK-8185077)" – Joe Apr 30 '19 at 11:25
  • 2
    So what is the replacement of Java applet, and Java Web Start? – Ben Lin Jul 27 '20 at 00:00
2

In short, this is because many main stream browsers had either removed or planned to remove standards based plugin support, therefore Oracle wants Java developers to migrate from Java applets to plugin-free Java Web-start technologies.

Oracle published a paper called "Migrating from Java Applets to plugin-free Java technologies " it explains in detail of why Applets are being deprecated and alternative ways developer should use.

I see Suresh quoting the executive overview below so I won't quote again.

OLIVER.KOO
  • 5,654
  • 3
  • 30
  • 62