迁移到Java Web Start

编程入门 行业动态 更新时间:2024-10-28 17:29:57
迁移到Java Web Start - Applet-Desc是否会被弃用?(Migrating to Java Web Start - Will Applet-Desc be deprecated?)

由于Java 9中的弃用,我正在研究将现有applet( 扩展Applet )移动到Java Web Start。但是,似乎大多数Oracle的迁移文档都指示开发人员使用“ applet-desc ”标记来创建一个新的JNLP并进行迁移。 这是否意味着不会弃用在浏览器之外启动applet?

如果没有,那么推荐的方法是什么? 说“重写你的applet”并没有帮助......这就是每个人都说的。 真的不给我“怎么样”。

有哪些可能的解决方案和迁移示例/教程? 我似乎无法找到更多更新的文档,我在2001年到2011年之间看到了很多东西。似乎大多数提供示例的网站不再托管应用程序,或者它们没有正确签名。

编辑

最重要的部分问题是:Oracle在弃用浏览器插件时是否弃用了Applet类? 或者,我们是否仍然可以在JNLP中使用扩展Applet的类,而不使用弃用警告?

我的applet需要在JSP中动态生成的用户身份验证和会话cookie。 我在网上看到这是可能的 。 此JWS应用程序不能脱机使用 ,而是要从HREF启动。 这仍然有效吗?

I'm working on research to move an existing applet (extends Applet) to Java Web Start due to the deprecation in Java 9. However, it seems like most of Oracle's migration docs instruct the dev to use the "applet-desc" tag to create a new JNLP and migrate. Does this mean that launching applets outside of the browser will not be deprecated?

If not, then what is the recommended approach? Saying "rewrite your applet" doesn't help... that's what everyone says. Doesn't really give me the "how".

What are possible solutions and examples/tutorials of migration? I can't seem to find much newer documentation out there, I see a lot of stuff between 2001 and 2011. It seems like most websites that provide examples no longer host the applications, or they aren't properly signed.

EDIT

My most important part of the question is: Is Oracle deprecating the Applet class when deprecating the browser plugin? Or, can we still use classes extending Applet within the tag in a JNLP, without a deprecation warning?

My applet requires user authentication and session cookies that are dynamically generated in our JSP. I've seen online that this is possible. This JWS application is not to be used offline, and is meant to be launched from an HREF. Is this still valid?

最满意答案

不赞成的事情是由浏览器制造商完成的(尽管甲骨文,现在意识到这种情况建议不要开发它们)。 所以Oracle并没有“弃用”applet标记(1),就像它已经弃用了Java Docs中偶尔提到的其他类,方法或属性一样。

至于使用JWS启动applet,是的,它应该仍然“有效”。 但请注意,虽然(例如)Chrome用于将JNLP直接传递给注册为该文件类型的使用者的程序(其中它将被传递到JRE中包含的Java Web Start Client),但它现在会导致用户首先下载JNLP,然后明确选择启动该文件。

更新: Oracle可能没有弃用applet标签,但他们将有效地做同样的事情来自Java 9.从JDK 9和Java插件 :

到2015年底,许多浏览器厂商已经删除或宣布了删除基于标准的插件支持的时间表,从而消除了嵌入Silverlight,Java,Flash和其他基于标准的插件技术的能力。

Oracle计划弃用 Java Standard Edition Development Kit 9(JDK 9)中的Java浏览器插件 。 弃用是对开发人员停止使用此技术的警告。 JRE 9将继续提供Java插件并支持在仍提供标准插件支持的浏览器上启动applet。 此浏览器插件将在未来的Java SE版本中从Oracle JDK和JRE中删除。 想要了解有关此计划更改的更多信息的开发人员和用户可以在此博客文章中找到更多信息 。

The thing that is deprecated is done by the browser manufacturers (though Oracle, realising the situation now advises not to develop them). So Oracle has not 'deprecated' the applet tag(1) in the same way that it has deprecated other classes, methods or attributes as occasionally mentioned in the Java Docs.

As to launching the applet using JWS, yes that should still 'work'. But note that whereas (for example) Chrome used to pass a JNLP direct to the program registered as a consumer of that file type (wherein it would be passed to the Java Web Start Client included in the JRE), it now causes the user to first download the JNLP, then explicitly choose to launch that file.

Update: Oracle may not have deprecated the applet tag, but they'll do effectively the same thing come Java 9. From JDK 9 and the Java Plugin:

By late 2015, many browser vendors have either removed or announced timelines for the removal of standards based plugin support, eliminating the ability to embed Silverlight, Java, Flash and other standards-based plugin technologies.

Oracle plans to deprecate the Java browser plugin in Java Standard Edition Development Kit 9 (JDK 9). Deprecation is a warning for developers to stop using this technology. JRE 9 will continue to provide the Java Plugin and support launching applets on browsers that still offer standard plugin support. This browser plugin will be removed from the Oracle JDK and JRE in a future Java SE release. Developers and users who want to learn more about this planned change can find out more in this blog post.

更多推荐

本文发布于:2023-08-03 06:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1384152.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Java   Web   Start

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!