Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why were applets deprecated in JDK 9?

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?

like image 226
Maksim Avatar asked Aug 06 '17 18:08

Maksim


People also ask

Does JDK 9 support applet?

Applets are deprecated in JDK 9, and this method is only used when running an FX application as an Applet in a browser.

Why are applets obsolete?

Applets are going to be obsolete when Java 9 comes out, because Oracle will stop distributing and supporting the Java browser plug-in.

What happened to Java applets?

Java applets were deprecated by Java 9 in 2017. Java applets were usually written in Java, but other languages such as Jython, JRuby, Pascal, Scala, NetRexx, or Eiffel (via SmartEiffel) could be used as well. Java applets run at very fast speeds and until 2011, they were many times faster than JavaScript.

Why did Java applets fail?

Summary of possible reasons why Java applets failed to catch on, dispite heavy initial momentum: Microsoft's luckluster browser support. Didn't have a native OS GUI look-and-feel. Were difficult to partition such that they often required long load times.


2 Answers

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.

like image 97
OLIVER.KOO Avatar answered Sep 28 '22 09:09

OLIVER.KOO


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.

like image 38
Suresh Atta Avatar answered Sep 28 '22 10:09

Suresh Atta