为什么在 JDK 9 中弃用了小程序?

Why were applets deprecated in JDK 9?

我最近在 Oracle 发表的一篇文章中读到,他们将在 JDK 中将 Applet class 标记为已弃用。 9. 我对 applet 没有什么经验;我只写了一些了解基础知识。

为什么它们不受欢迎,它们被弃用的主要原因是什么?

小程序在几年前非常流行,但现在浏览器世界发生了变化,安全性正成为所有主要浏览器供应商关注的重点。

Java团队在文档Migrating from Java Applets to plugin-free Java technologies中给出了完整的集合或原因、备选方案等。在第 4 页上,有以下 执行概述

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.

简而言之,这是因为许多主流浏览器 已经删除或计划删除基于标准的插件 支持,因此 Oracle 希望 Java 开发人员从 Java 小程序迁移到无插件 Java Web 启动技术。

Oracle 发表了一篇论文,名为 “从 Java 小程序迁移到无插件 Java 技术“ 它详细解释了为什么小程序被弃用以及开发人员应该使用的替代方法。

我看到 Suresh 在下面引用了执行概述,所以我不会再引用了。